Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
Signed-off-by: SpadeA-Tang <[email protected]>
  • Loading branch information
SpadeA-Tang committed Jul 4, 2022
1 parent 6c47af8 commit 996897d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion session/txnmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (m *txnManager) GetSnapshotWithStmtReadTS() (kv.Snapshot, error) {
return m.ctxProvider.GetSnapshotWithStmtReadTS()
}

// GetSnapshotWithStmtForUpdateTS get snapshot with for update ts
// GetSnapshotWithStmtForUpdateTS gets snapshot with for update ts
func (m *txnManager) GetSnapshotWithStmtForUpdateTS() (kv.Snapshot, error) {
if m.ctxProvider == nil {
return nil, errors.New("context provider not set")
Expand Down
4 changes: 2 additions & 2 deletions sessiontxn/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ type TxnContextProvider interface {
GetStmtForUpdateTS() (uint64, error)
// GetSnapshotWithStmtReadTS gets snapshot with read ts
GetSnapshotWithStmtReadTS() (kv.Snapshot, error)
// GetSnapshotWithStmtForUpdateTS get snapshot with for update ts
// GetSnapshotWithStmtForUpdateTS gets snapshot with for update ts
GetSnapshotWithStmtForUpdateTS() (kv.Snapshot, error)

// OnInitialize is the hook that should be called when enter a new txn with this provider
Expand Down Expand Up @@ -153,7 +153,7 @@ type TxnManager interface {
GetContextProvider() TxnContextProvider
// GetSnapshotWithStmtReadTS gets snapshot with read ts
GetSnapshotWithStmtReadTS() (kv.Snapshot, error)
// GetSnapshotWithStmtForUpdateTS get snapshot with for update ts
// GetSnapshotWithStmtForUpdateTS gets snapshot with for update ts
GetSnapshotWithStmtForUpdateTS() (kv.Snapshot, error)

// EnterNewTxn enters a new transaction.
Expand Down
2 changes: 1 addition & 1 deletion sessiontxn/isolation/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (p *baseTxnContextProvider) GetSnapshotWithStmtReadTS() (kv.Snapshot, error
return p.getSnapshotByTS(ts)
}

// GetSnapshotWithStmtForUpdateTS get snapshot with for update ts
// GetSnapshotWithStmtForUpdateTS gets snapshot with for update ts
func (p *baseTxnContextProvider) GetSnapshotWithStmtForUpdateTS() (kv.Snapshot, error) {
ts, err := p.GetStmtForUpdateTS()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion sessiontxn/staleread/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (p *StalenessTxnContextProvider) GetSnapshotWithStmtReadTS() (kv.Snapshot,
return snapshot, nil
}

// GetSnapshotWithStmtForUpdateTS get snapshot with for update ts
// GetSnapshotWithStmtForUpdateTS gets snapshot with for update ts
func (p *StalenessTxnContextProvider) GetSnapshotWithStmtForUpdateTS() (kv.Snapshot, error) {
return nil, errors.New("GetSnapshotWithStmtForUpdateTS not supported for stalenessTxnProvider")
}

0 comments on commit 996897d

Please sign in to comment.