mirror of
https://github.com/facebook/rocksdb.git
synced 2026-07-07 14:47:40 +08:00
Fix HyperClockCache naive Lookup fast-path chain indexing to skip full fallback (#14901)
Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/14901 Reviewed By: anand1976 Differential Revision: D109906106 fbshipit-source-id: 660a47f51250415286af4f9ddcb0c40410ef04cd
This commit is contained in:
committed by
meta-codesync[bot]
parent
de7b8e8f7d
commit
1f7a286413
Vendored
+1
-1
@@ -3108,7 +3108,7 @@ AutoHyperClockTable::HandleImpl* AutoHyperClockTable::Lookup(
|
|||||||
HandleImpl* const arr = array_.Get();
|
HandleImpl* const arr = array_.Get();
|
||||||
NextWithShift next_with_shift = arr[home].head_next_with_shift.LoadRelaxed();
|
NextWithShift next_with_shift = arr[home].head_next_with_shift.LoadRelaxed();
|
||||||
for (size_t i = 0; !next_with_shift.IsEnd() && i < 10; ++i) {
|
for (size_t i = 0; !next_with_shift.IsEnd() && i < 10; ++i) {
|
||||||
HandleImpl* h = &arr[next_with_shift.IsEnd()];
|
HandleImpl* h = &arr[next_with_shift.GetNext()];
|
||||||
// Attempt cheap key match without acquiring a read ref. This could give a
|
// Attempt cheap key match without acquiring a read ref. This could give a
|
||||||
// false positive, which is re-checked after acquiring read ref, or false
|
// false positive, which is re-checked after acquiring read ref, or false
|
||||||
// negative, which is re-checked in the full Lookup. Also, this is a
|
// negative, which is re-checked in the full Lookup. Also, this is a
|
||||||
|
|||||||
Reference in New Issue
Block a user