MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / logCommittedWAL

Method logCommittedWAL

src/storage/wal/wal.cpp:30–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28WAL::~WAL() {}
29
30void WAL::logCommittedWAL(LocalWAL& localWAL, main::ClientContext* context,
31 uint64_t& commitSequence) {
32 DASSERT(!readOnly);
33 commitSequence = 0;
34 if (inMemory || localWAL.getSize() == 0) {
35 return; // No need to log empty WAL.
36 }
37 std::unique_lock lck{mtx};
38 throwIfPoisonedNoLock();
39 initWriter(context);
40 localWAL.inMemWriter->flush(*serializer->getWriter());
41 commitSequence = ++appendedCommitSequence;
42 waitForDurabilityNoLock(commitSequence, lck);
43}
44
45void WAL::logAndFlushCheckpoint(main::ClientContext* context) {
46 std::unique_lock lck{mtx};

Callers 2

TEST_FFunction · 0.80
writeCommitToWALMethod · 0.80

Calls 2

getSizeMethod · 0.45
flushMethod · 0.45

Tested by 1

TEST_FFunction · 0.64