Skip to content

Commit

Permalink
some fixes and using art 1.0.74
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed Jun 6, 2024
1 parent d6c005a commit 4fca3e2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ go 1.21

toolchain go1.22.2

require github.com/absolutelightning/go-immutable-adaptive-radix v1.0.73
require github.com/absolutelightning/go-immutable-adaptive-radix v1.0.74
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/absolutelightning/go-immutable-adaptive-radix v1.0.73 h1:DLZuGro0Q0ZqzFt1LTGTJvMNJCGEwMmOcFsu7VUo/yc=
github.com/absolutelightning/go-immutable-adaptive-radix v1.0.73/go.mod h1:+/nWgzXP46cOw2W+jLxu2lBmEny3bG1RqFXPKTWTLMU=
github.com/absolutelightning/go-immutable-adaptive-radix v1.0.74 h1:QT4pCjW2xAS5xXkiHqsrFRlCwTvTuGJSyuksdPVmZEk=
github.com/absolutelightning/go-immutable-adaptive-radix v1.0.74/go.mod h1:+/nWgzXP46cOw2W+jLxu2lBmEny3bG1RqFXPKTWTLMU=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
Expand Down
3 changes: 0 additions & 3 deletions memdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ func (db *MemDB) DBSchema() *DBSchema {
// getRoot is used to do an atomic load of the root pointer
func (db *MemDB) getRoot(clone bool) *adaptive.RadixTree[any] {
root := (*adaptive.RadixTree[any])(atomic.LoadPointer(&db.root))
if clone {
return root.Clone(true)
}
return root
}

Expand Down
4 changes: 2 additions & 2 deletions txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (txn *Txn) readableIndex(table, index string) *adaptive.Txn[any] {
key := tableIndex{table, index}
exist, ok := txn.modified[key]
if ok {
return exist.Clone(false)
return exist.Clone()
}
}

Expand Down Expand Up @@ -1009,7 +1009,7 @@ func (txn *Txn) Snapshot() *Txn {

snapshot := &Txn{
db: txn.db,
rootTxn: txn.rootTxn.Clone(true),
rootTxn: txn.rootTxn.Clone(),
}

// Commit sub-transactions into the snapshot
Expand Down

0 comments on commit 4fca3e2

Please sign in to comment.