From 1f7a28641353b34e365df1aafc4d20981dc79a6e Mon Sep 17 00:00:00 2001 From: generatedunixname1395027625275998 Date: Wed, 1 Jul 2026 13:45:18 -0700 Subject: [PATCH] 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 --- cache/clock_cache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/clock_cache.cc b/cache/clock_cache.cc index 70155791a4..f2bdb29164 100644 --- a/cache/clock_cache.cc +++ b/cache/clock_cache.cc @@ -3108,7 +3108,7 @@ AutoHyperClockTable::HandleImpl* AutoHyperClockTable::Lookup( HandleImpl* const arr = array_.Get(); NextWithShift next_with_shift = arr[home].head_next_with_shift.LoadRelaxed(); 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 // 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