MCPcopy Create free account
hub / github.com/XTXMarkets/ternfs / writeLogEntry

Method writeLogEntry

cpp/core/LogsDB.cpp:293–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291 }
292
293 void writeLogEntry(const LogsDBLogEntry& entry) {
294 _maybeRotate();
295
296 auto& partition = _getPartitionForIdx(entry.idx);
297 _sharedDb.db()->Put({}, partition.cf, U64Key::Static(entry.idx.u64).toSlice(), rocksdb::Slice((const char*)entry.value.data(), entry.value.size()));
298 _partitionKeyInserted(partition, entry.idx);
299
300 }
301
302 void dropEntriesAfterIdx(LogIdx start) {
303 auto iterator = getIterator();

Callers 2

Calls 5

dbMethod · 0.80
PutMethod · 0.45
toSliceMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected