MCPcopy Create free account
hub / github.com/amit-davidson/Building-a-NoSQL-database-from-zero / getSplitIndex

Method getSplitIndex

Part 7/dal.go:98–113  ·  view source on GitHub ↗

getSplitIndex should be called when performing rebalance after an item is removed. It checks if a node can spare an element, and if it does then it returns the index when there the split should happen. Otherwise -1 is returned.

(node *Node)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

canSpareAnElementMethod · 0.45
splitMethod · 0.45

Calls 2

minThresholdMethod · 0.95
elementSizeMethod · 0.45

Tested by

no test coverage detected