Skip to content

Commit

Permalink
Absl (#52)
Browse files Browse the repository at this point in the history
* fix go mod

* Dev to Main (#39)

* try fixing race

* Revert "try fixing race"

This reverts commit 02ff901.

* using lock for set child and get child

* using locks only for set child and get child

* fix nil mu

* fix delete

* using locks to set attribute of node

* fix memdb tests

* tracking channel of child changes

* removed process lazy redundant

* fix nil check

* Fix get watch bug

* go fmt

* some minor fixes

* merge main

* fix go mod

* fix go mod

* fmt

* Dev to Main (#40)

* try fixing race

* Revert "try fixing race"

This reverts commit 02ff901.

* using lock for set child and get child

* using locks only for set child and get child

* fix nil mu

* fix delete

* using locks to set attribute of node

* fix memdb tests

* tracking channel of child changes

* removed process lazy redundant

* fix nil check

* Fix get watch bug

* go fmt

* some minor fixes

* merge main

* fix go mod

* fix go mod

* some minor fixes

* some minor fixes

* fmt

* Dev to main (#41)

* try fixing race

* Revert "try fixing race"

This reverts commit 02ff901.

* using lock for set child and get child

* using locks only for set child and get child

* fix nil mu

* fix delete

* using locks to set attribute of node

* fix memdb tests

* tracking channel of child changes

* removed process lazy redundant

* fix nil check

* Fix get watch bug

* go fmt

* some minor fixes

* merge main

* fix go mod

* fix go mod

* some minor fixes

* some minor fixes

* fmt

* some fixes

* Dev to Main (#42)

* try fixing race

* Revert "try fixing race"

This reverts commit 02ff901.

* using lock for set child and get child

* using locks only for set child and get child

* fix nil mu

* fix delete

* using locks to set attribute of node

* fix memdb tests

* tracking channel of child changes

* removed process lazy redundant

* fix nil check

* Fix get watch bug

* go fmt

* some minor fixes

* merge main

* fix go mod

* fix go mod

* some minor fixes

* some minor fixes

* fmt

* some fixes

* fix seek prefix watch

* SeekPrefix Watch Fix (#43)

* try fixing race

* Revert "try fixing race"

This reverts commit 02ff901.

* using lock for set child and get child

* using locks only for set child and get child

* fix nil mu

* fix delete

* using locks to set attribute of node

* fix memdb tests

* tracking channel of child changes

* removed process lazy redundant

* fix nil check

* Fix get watch bug

* go fmt

* some minor fixes

* merge main

* fix go mod

* fix go mod

* some minor fixes

* some minor fixes

* fmt

* some fixes

* fix seek prefix watch

* bug fix

* some fixes
  • Loading branch information
absolutelightning authored May 30, 2024
1 parent d4d7686 commit 3743bee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ func (t *Txn[T]) removeChild4(n Node[T], c byte) Node[T] {
copy(nodeToReturn.getPartial(), n.getPartial()[:min(prefix, maxPrefixLen)])
nodeToReturn.setPartialLen(nodeToReturn.getPartialLen() + n.getPartialLen() + 1)
}
t.trackChannel(n)
return nodeToReturn
}
return n
Expand All @@ -395,6 +396,7 @@ func (t *Txn[T]) removeChild16(n Node[T], c byte) Node[T] {
n.setNumChildren(n.getNumChildren() - 1)

if n.getNumChildren() == 3 {
t.trackChannel(n)
newNode := t.allocNode(node4)
n4 := newNode.(*Node4[T])
t.copyHeader(newNode, n)
Expand All @@ -413,6 +415,7 @@ func (t *Txn[T]) removeChild48(n Node[T], c uint8) Node[T] {

if n.getNumChildren() == 12 {
newNode := t.allocNode(node16)
t.trackChannel(n)
t.copyHeader(newNode, n)
child := 0
for i := 0; i < 256; i++ {
Expand All @@ -437,6 +440,7 @@ func (t *Txn[T]) removeChild256(n Node[T], c uint8) Node[T] {
if n.getNumChildren() == 37 {
newNode := t.allocNode(node48)
t.copyHeader(newNode, n)
t.trackChannel(n)

pos := 0
for i := 0; i < 256; i++ {
Expand Down

0 comments on commit 3743bee

Please sign in to comment.