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

Method writeLastBlockToFile

fdbrpc/AsyncFileEncrypted.actor.cpp:221–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221Future<Void> AsyncFileEncrypted::writeLastBlockToFile() {
222 // The source buffer for the write is owned by *this so this must be kept alive by reference count until the write
223 // is finished.
224 return uncancellable(
225 holdWhile(Reference<AsyncFileEncrypted>::addRef(this),
226 file->write(&writeBuffer[0], offsetInBlock, currentBlock * FLOW_KNOBS->ENCRYPTION_BLOCK_SIZE)));
227}
228
229size_t AsyncFileEncrypted::RandomCache::evict() {
230 ASSERT_EQ(vec.size(), maxSize);

Callers 2

writeMethod · 0.80
syncMethod · 0.80

Calls 2

uncancellableFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected