mirror of https://github.com/ledisdb/ledisdb.git
tx commit bugfix
This commit is contained in:
parent
9b1c6c4223
commit
76896882a9
|
@ -111,6 +111,8 @@ type Tx struct {
|
|||
tx *store.Tx
|
||||
|
||||
logs [][]byte
|
||||
|
||||
index uint8
|
||||
}
|
||||
|
||||
func (db *DB) IsTransaction() bool {
|
||||
|
@ -132,6 +134,7 @@ func (db *DB) Begin() (*Tx, error) {
|
|||
tx.DB.dbLock.Lock()
|
||||
|
||||
tx.DB.l = db.l
|
||||
tx.index = db.index
|
||||
|
||||
tx.DB.sdb = db.sdb
|
||||
|
||||
|
@ -201,3 +204,7 @@ func (tx *Tx) newBatch() *batch {
|
|||
|
||||
return b
|
||||
}
|
||||
|
||||
func (tx *Tx) Index() int {
|
||||
return int(tx.index)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue