MCPcopy Create free account
hub / github.com/apple/foundationdb / readPhysicalBlock

Function readPhysicalBlock

fdbserver/VersionedBTree.actor.cpp:2967–2977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2965 void freeExtent(LogicalPageID pageID) override { freeExtent_impl(this, pageID); }
2966
2967 ACTOR static UNCANCELLABLE Future<int> readPhysicalBlock(DWALPager* self,
2968 Reference<ArenaPage> pageBuffer,
2969 int pageOffset,
2970 int blockSize,
2971 int64_t offset,
2972 int priority) {
2973 state PriorityMultiLock::Lock lock = wait(self->ioLock.lock(std::min(priority, ioMaxPriority)));
2974 ++g_redwoodMetrics.metric.pagerDiskRead;
2975 int bytes = wait(self->pageFile->read(pageBuffer->rawData() + pageOffset, blockSize, offset));
2976 return bytes;
2977 }
2978
2979 // Read a physical page from the page file. Note that header pages use a page size of smallestPhysicalBlock.
2980 // If the user chosen physical page size is larger, then there will be a gap of unused space after the header pages

Callers 2

readPhysicalPageFunction · 0.85
readPhysicalMultiPageFunction · 0.85

Calls 3

rawDataMethod · 0.80
readMethod · 0.65
lockMethod · 0.45

Tested by

no test coverage detected