Skip to content

Commit

Permalink
modify 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 Jun 29, 2022
1 parent b12cb47 commit 2a5ca70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sessiontxn/isolation/readcommitted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ func TestPessimisticRCTxnContextProviderRCCheck(t *testing.T) {
forUpdateStmt := stmts[0]

compareTS := se.GetSessionVars().TxnCtx.StartTS
// first ts should request from tso
// first ts should use the txn startTS
require.NoError(t, executor.ResetContextOfStmt(se, readOnlyStmt))
require.NoError(t, provider.OnStmtStart(context.TODO(), readOnlyStmt))
ts, err := provider.GetStmtReadTS()
require.NoError(t, err)
require.Equal(t, ts, compareTS)
rcCheckTS := ts

// second ts should reuse first ts
// second ts should reuse the txn startTS
require.NoError(t, executor.ResetContextOfStmt(se, readOnlyStmt))
require.NoError(t, provider.OnStmtStart(context.TODO(), readOnlyStmt))
ts, err = provider.GetStmtReadTS()
Expand Down Expand Up @@ -166,7 +166,7 @@ func TestPessimisticRCTxnContextProviderRCCheckForPrepareExecute(t *testing.T) {
require.NoError(t, err)
require.Equal(t, txnStartTS, ts)

// second ts should reuse first ts
// second ts should reuse the txn startTS
rs, err = tk.Session().ExecutePreparedStmt(ctx, stmt, []types.Datum{})
tk.ResultSetToResult(rs, fmt.Sprintf("%v", rs)).Check(testkit.Rows("1 1"))
require.NoError(t, err)
Expand Down

0 comments on commit 2a5ca70

Please sign in to comment.