MCPcopy Create free account
hub / github.com/ElementsProject/elements / AddIterators

Method AddIterators

src/leveldb/db/version_set.cc:230–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void Version::AddIterators(const ReadOptions& options,
231 std::vector<Iterator*>* iters) {
232 // Merge all level zero files together since they may overlap
233 for (size_t i = 0; i < files_[0].size(); i++) {
234 iters->push_back(vset_->table_cache_->NewIterator(
235 options, files_[0][i]->number, files_[0][i]->file_size));
236 }
237
238 // For levels > 0, we can use a concatenating iterator that sequentially
239 // walks through the non-overlapping files in the level, opening them
240 // lazily.
241 for (int level = 1; level < config::kNumLevels; level++) {
242 if (!files_[level].empty()) {
243 iters->push_back(NewConcatenatingIterator(options, level));
244 }
245 }
246}
247
248// Callback from TableCache::Get()
249namespace {

Callers 1

NewInternalIteratorMethod · 0.80

Calls 4

sizeMethod · 0.45
push_backMethod · 0.45
NewIteratorMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected