chore: revert custom index in favor of key_Split

Signed-off-by: Keith Zantow <keith.zantow@anchore.com>
This commit is contained in:
Keith Zantow
2026-09-20 11:22:10 -04:00
parent 99615b7dfa
commit 53cd4254e4
81 changed files with 7461 additions and 6624 deletions
+3 -5
View File
@@ -5,12 +5,10 @@ import (
"sync"
)
// lockable is a read-write lock that hands back its own unlock function.
// lockable is a read-write lock that returns its own unlock function.
//
// Returning the unlocker rather than exposing Unlock is what makes the index's lock upgrades safe to
// write: a caller holds an opaque `unlock`, and the node it is walking can tell whether that unlock
// belongs to the write lock or the read lock and upgrade only when it has to. Carried over from the
// prototype this index came from, where the pattern is used throughout.
// Handing back an opaque unlocker (rather than exposing Unlock) lets a node tell whether the caller
// holds the read or write lock and upgrade only when needed. Carried over from the prototype index.
type lockable struct {
lock sync.RWMutex
}