Skip to content

Commit

Permalink
Export commitTS of KVTxn
Browse files Browse the repository at this point in the history
  • Loading branch information
b6g committed Nov 11, 2024
1 parent c154447 commit 337f334
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions txnkv/transaction/test_probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ func (txn TxnProbe) SetStartTS(ts uint64) {
txn.startTS = ts
}

// GetCommitTS returns the commit ts.
func (txn TxnProbe) GetCommitTS() uint64 {
return txn.commitTS
}

// GetUnionStore returns transaction's embedded unionstore.
func (txn TxnProbe) GetUnionStore() *unionstore.KVUnionStore {
return txn.us
Expand Down
4 changes: 4 additions & 0 deletions txnkv/transaction/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,10 @@ func (txn *KVTxn) StartTS() uint64 {
return txn.startTS
}

func (txn *KVTxn) CommitTS() uint64 {
return txn.commitTS
}

// Valid returns if the transaction is valid.
// A transaction become invalid after commit or rollback.
func (txn *KVTxn) Valid() bool {
Expand Down

0 comments on commit 337f334

Please sign in to comment.