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

Method _getPartitionIterators

cpp/core/LogsDB.cpp:322–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320 }
321
322 std::vector<std::unique_ptr<rocksdb::Iterator>> _getPartitionIterators() const {
323 std::vector<rocksdb::ColumnFamilyHandle*> cfHandles;
324 cfHandles.reserve(_partitions.size());
325 for (const auto& partition : _partitions) {
326 cfHandles.emplace_back(partition.cf);
327 }
328 std::vector<std::unique_ptr<rocksdb::Iterator>> iterators;
329 iterators.reserve(_partitions.size());
330 ROCKS_DB_CHECKED(_sharedDb.db()->NewIterators({}, cfHandles, (std::vector<rocksdb::Iterator*>*)(&iterators)));
331 return iterators;
332 }
333
334 void _maybeRotate() {
335 auto& partition = _getPartitionForIdx(MAX_LOG_IDX);

Callers 2

IteratorMethod · 0.80
seekMethod · 0.80

Calls 2

dbMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected