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

Method flush

fdbrpc/AsyncFileCached.actor.cpp:252–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252Future<Void> AsyncFileCached::flush() {
253 ++countFileCacheWrites;
254 ++countCacheWrites;
255
256 std::vector<Future<Void>> unflushed;
257
258 int debug_count = flushable.size();
259 for (int i = 0; i < flushable.size();) {
260 auto p = flushable[i];
261 auto f = p->flush();
262 if (!f.isReady() || f.isError())
263 unflushed.push_back(f);
264 ASSERT((i < flushable.size() && flushable[i] == p) != f.isReady());
265 if (!f.isReady())
266 i++;
267 }
268 ASSERT(flushable.size() <= debug_count);
269
270 return waitForAll(unflushed);
271}
272
273Future<Void> AsyncFileCached::quiesce() {
274 std::vector<Future<Void>> unquiescent;

Callers 6

writeLogLineFunction · 0.45
Future<Void> flushQueuesFunction · 0.45
Future<Void> commit_implFunction · 0.45
changeFileSizeMethod · 0.45

Calls 5

waitForAllFunction · 0.85
sizeMethod · 0.45
isReadyMethod · 0.45
isErrorMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected