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

Method semiCommit

fdbserver/KeyValueStoreMemory.actor.cpp:100–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 }
99
100 void semiCommit() {
101 transactionSize += queue.totalSize();
102 if (transactionSize > 0.5 * committedDataSize) {
103 transactionIsLarge = true;
104 TraceEvent("KVSMemSwitchingToLargeTransactionMode", id)
105 .detail("TransactionSize", transactionSize)
106 .detail("DataSize", committedDataSize);
107 CODE_PROBE(true, "KeyValueStoreMemory switching to large transaction mode");
108 CODE_PROBE(committedDataSize > 1e3,
109 "KeyValueStoreMemory switching to large transaction mode with committed data");
110 }
111
112 int64_t bytesWritten = commit_queue(queue, true);
113 committedWriteBytes += bytesWritten;
114 }
115
116 void set(KeyValueRef keyValue, const Arena* arena) override {
117 // A commit that occurs with no available space returns Never, so we can throw out all modifications

Callers 1

recoverMethod · 0.95

Calls 3

TraceEventClass · 0.85
detailMethod · 0.80
totalSizeMethod · 0.45

Tested by

no test coverage detected