This commit is contained in:
chrislu
2022-09-14 23:06:44 -07:00
parent c8645fd232
commit 21c0587900
45 changed files with 730 additions and 694 deletions

View File

@@ -49,7 +49,7 @@ func NewCompactSection(start NeedleId) *CompactSection {
}
}
//return old entry size
// return old entry size
func (cs *CompactSection) Set(key NeedleId, offset Offset, size Size) (oldOffset Offset, oldSize Size) {
cs.Lock()
if key > cs.end {
@@ -142,7 +142,7 @@ func (cs *CompactSection) deleteOverflowEntry(key SectionalNeedleId) {
}
}
//return old entry size
// return old entry size
func (cs *CompactSection) Delete(key NeedleId) Size {
skey := SectionalNeedleId(key - cs.start)
cs.Lock()
@@ -189,8 +189,8 @@ func (cs *CompactSection) binarySearchValues(key SectionalNeedleId) int {
return x
}
//This map assumes mostly inserting increasing keys
//This map assumes mostly inserting increasing keys
// This map assumes mostly inserting increasing keys
// This map assumes mostly inserting increasing keys
type CompactMap struct {
list []*CompactSection
}