Skip to content

Commit

Permalink
using art 1.0.90
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed Aug 17, 2024
1 parent de274f8 commit 8bd6b9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion memdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (db *MemDB) Txn(write bool) *Txn {
txn := &Txn{
db: db,
write: write,
rootTxn: db.getRoot().Txn(write),
rootTxn: db.getRoot().Txn(),
}
return txn
}
Expand Down
8 changes: 4 additions & 4 deletions txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ 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()
}
}

// Create a read transaction
path := indexPath(table, index)
raw, _ := txn.rootTxn.Get(path)
indexTxn := raw.(*adaptive.RadixTree[any]).Txn(false)
indexTxn := raw.(*adaptive.RadixTree[any]).Txn()
return indexTxn
}

Expand All @@ -91,7 +91,7 @@ func (txn *Txn) writableIndex(table, index string) *adaptive.Txn[any] {
// Start a new transaction
path := indexPath(table, index)
raw, _ := txn.rootTxn.Get(path)
indexTxn := raw.(*adaptive.RadixTree[any]).Txn(true)
indexTxn := raw.(*adaptive.RadixTree[any]).Txn()

// If we are the primary DB, enable mutation tracking. Snapshots should
// not notify, otherwise we will trigger watches on the primary DB when
Expand Down Expand Up @@ -1062,7 +1062,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 8bd6b9c

Please sign in to comment.