| 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 |
no test coverage detected