MCPcopy Create free account
hub / github.com/cockroachdb/swiss / bucketStep

Function bucketStep

map.go:882–885  ·  view source on GitHub ↗

bucketStep is the number of buckets to step over in the buckets directory to reach the next different bucket. A bucket occupies 1 or more contiguous entries in the buckets directory specified by the range: [b.index:b.index+bucketStep(m.globalDepth(), b.localDepth)]

(globalDepth, localDepth uint32)

Source from the content-addressed store, hash-verified

880//
881// [b.index:b.index+bucketStep(m.globalDepth(), b.localDepth)]
882func bucketStep(globalDepth, localDepth uint32) uint32 {
883 const shiftMask = 31
884 return uint32(1) << ((globalDepth - localDepth) & shiftMask)
885}
886
887// adjustBucketIndex adjusts the index of a bucket to account for the growth
888// of the directory where index was captured at originalGlobalDepth and we're

Callers 4

bucketsMethod · 0.85
installBucketMethod · 0.85
growDirectoryMethod · 0.85
splitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…