correct level information in version_set.cc (#6920)
Summary: fix these two issues https://github.com/facebook/rocksdb/issues/6912 and https://github.com/facebook/rocksdb/issues/6667 Pull Request resolved: https://github.com/facebook/rocksdb/pull/6920 Reviewed By: cheng-chang Differential Revision: D21864885 Pulled By: ajkr fbshipit-source-id: 10e21fc1851b67a59d44358f59c64fa5523bd263
This commit is contained in:
parent
22e5c513c2
commit
ffe08ffcc2
@ -1806,11 +1806,11 @@ void Version::Get(const ReadOptions& read_options, const LookupKey& k,
|
|||||||
cfd_->internal_stats()->GetFileReadHist(fp.GetHitFileLevel()),
|
cfd_->internal_stats()->GetFileReadHist(fp.GetHitFileLevel()),
|
||||||
IsFilterSkipped(static_cast<int>(fp.GetHitFileLevel()),
|
IsFilterSkipped(static_cast<int>(fp.GetHitFileLevel()),
|
||||||
fp.IsHitFileLastInLevel()),
|
fp.IsHitFileLastInLevel()),
|
||||||
fp.GetCurrentLevel());
|
fp.GetHitFileLevel());
|
||||||
// TODO: examine the behavior for corrupted key
|
// TODO: examine the behavior for corrupted key
|
||||||
if (timer_enabled) {
|
if (timer_enabled) {
|
||||||
PERF_COUNTER_BY_LEVEL_ADD(get_from_table_nanos, timer.ElapsedNanos(),
|
PERF_COUNTER_BY_LEVEL_ADD(get_from_table_nanos, timer.ElapsedNanos(),
|
||||||
fp.GetCurrentLevel());
|
fp.GetHitFileLevel());
|
||||||
}
|
}
|
||||||
if (!status->ok()) {
|
if (!status->ok()) {
|
||||||
return;
|
return;
|
||||||
@ -1946,11 +1946,11 @@ void Version::MultiGet(const ReadOptions& read_options, MultiGetRange* range,
|
|||||||
cfd_->internal_stats()->GetFileReadHist(fp.GetHitFileLevel()),
|
cfd_->internal_stats()->GetFileReadHist(fp.GetHitFileLevel()),
|
||||||
IsFilterSkipped(static_cast<int>(fp.GetHitFileLevel()),
|
IsFilterSkipped(static_cast<int>(fp.GetHitFileLevel()),
|
||||||
fp.IsHitFileLastInLevel()),
|
fp.IsHitFileLastInLevel()),
|
||||||
fp.GetCurrentLevel());
|
fp.GetHitFileLevel());
|
||||||
// TODO: examine the behavior for corrupted key
|
// TODO: examine the behavior for corrupted key
|
||||||
if (timer_enabled) {
|
if (timer_enabled) {
|
||||||
PERF_COUNTER_BY_LEVEL_ADD(get_from_table_nanos, timer.ElapsedNanos(),
|
PERF_COUNTER_BY_LEVEL_ADD(get_from_table_nanos, timer.ElapsedNanos(),
|
||||||
fp.GetCurrentLevel());
|
fp.GetHitFileLevel());
|
||||||
}
|
}
|
||||||
if (!s.ok()) {
|
if (!s.ok()) {
|
||||||
// TODO: Set status for individual keys appropriately
|
// TODO: Set status for individual keys appropriately
|
||||||
@ -5672,7 +5672,7 @@ InternalIterator* VersionSet::MakeInputIterator(
|
|||||||
/*table_reader_ptr=*/nullptr,
|
/*table_reader_ptr=*/nullptr,
|
||||||
/*file_read_hist=*/nullptr, TableReaderCaller::kCompaction,
|
/*file_read_hist=*/nullptr, TableReaderCaller::kCompaction,
|
||||||
/*arena=*/nullptr,
|
/*arena=*/nullptr,
|
||||||
/*skip_filters=*/false, /*level=*/static_cast<int>(which),
|
/*skip_filters=*/false, /*level=*/static_cast<int>(c->level(which)),
|
||||||
/*smallest_compaction_key=*/nullptr,
|
/*smallest_compaction_key=*/nullptr,
|
||||||
/*largest_compaction_key=*/nullptr,
|
/*largest_compaction_key=*/nullptr,
|
||||||
/*allow_unprepared_value=*/false);
|
/*allow_unprepared_value=*/false);
|
||||||
@ -5686,7 +5686,7 @@ InternalIterator* VersionSet::MakeInputIterator(
|
|||||||
/*should_sample=*/false,
|
/*should_sample=*/false,
|
||||||
/*no per level latency histogram=*/nullptr,
|
/*no per level latency histogram=*/nullptr,
|
||||||
TableReaderCaller::kCompaction, /*skip_filters=*/false,
|
TableReaderCaller::kCompaction, /*skip_filters=*/false,
|
||||||
/*level=*/static_cast<int>(which), range_del_agg,
|
/*level=*/static_cast<int>(c->level(which)), range_del_agg,
|
||||||
c->boundaries(which));
|
c->boundaries(which));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user