Skip to content

Commit

Permalink
add '.' to statement
Browse files Browse the repository at this point in the history
Signed-off-by: TonsnakeLin <lpbgytong@163.com>
  • Loading branch information
TonsnakeLin committed Apr 7, 2022
1 parent 8f1b17e commit 98ffcc8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions domain/infosync/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ func (is *InfoSyncer) ReportMinStartTS(store kv.Storage) {
return
}
now := oracle.GetTimeFromTS(currentVer.Ver)
// GCMaxWaitTime is in seconds, GCMaxWaitTime * 1000 converts it to milliseconds
// GCMaxWaitTime is in seconds, GCMaxWaitTime * 1000 converts it to milliseconds.
startTSLowerLimit := oracle.GoTimeToLowerLimitStartTS(now, variable.GCMaxWaitTime.Load()*1000)

minStartTS := oracle.GoTimeToTS(now)
Expand Down Expand Up @@ -1058,7 +1058,7 @@ func ConfigureTiFlashPDForPartitions(accel bool, definitions *[]model.PartitionD
return nil
}

// StoreInternalSession is the entry function for store an internal session to SessionManager
// StoreInternalSession is the entry function for store an internal session to SessionManager.
func StoreInternalSession(se interface{}) {
is, err := getGlobalInfoSyncer()
if err != nil {
Expand All @@ -1071,7 +1071,7 @@ func StoreInternalSession(se interface{}) {
sm.StoreInternalSession(se)
}

// DeleteInternalSession is the entry function for delete an internal session from SessionManager
// DeleteInternalSession is the entry function for delete an internal session from SessionManager.
func DeleteInternalSession(se interface{}) {
is, err := getGlobalInfoSyncer()
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions kv/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

const (
// TimeToPrintLongTimeInternalTxn is the duration if the internal transaction lasts more than it,
// TiDB prints a log message
// TiDB prints a log message.
TimeToPrintLongTimeInternalTxn = time.Minute * 5
)

Expand All @@ -59,7 +59,7 @@ func (ib *innerTxnStartTsBox) deleteInnerTxnTS(startTS uint64) {
ib.innerTSLock.Unlock()
}

// GetMinInnerTxnStartTS get the min StartTS between startTSLowerLimit and curMinStartTS in globalInnerTxnTsBox
// GetMinInnerTxnStartTS get the min StartTS between startTSLowerLimit and curMinStartTS in globalInnerTxnTsBox.
func GetMinInnerTxnStartTS(now time.Time, startTSLowerLimit uint64,
curMinStartTS uint64) uint64 {
return globalInnerTxnTsBox.getMinStartTS(now, startTSLowerLimit, curMinStartTS)
Expand All @@ -79,9 +79,9 @@ func (ib *innerTxnStartTsBox) getMinStartTS(now time.Time, startTSLowerLimit uin
return minStartTS
}

// PrintLongTimeInternalTxn print the internal transaction information
// PrintLongTimeInternalTxn print the internal transaction information.
// runByFunction true means the transaction is run by `RunInNewTxn`,
// false means the transaction is run by internal session
// false means the transaction is run by internal session.
func PrintLongTimeInternalTxn(now time.Time, startTS uint64, runByFunction bool) {
if startTS > 0 {
innerTxnStartTime := oracle.GetTimeFromTS(startTS)
Expand Down
2 changes: 0 additions & 2 deletions kv/txn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ func TestRetryExceedCountError(t *testing.T) {
assert.NotNil(t, err)
}

// fmt.Println("ts0:", ts0, " ts1:", ts1, " ts2:", ts2, " ts3:", ts3, " lowLimit:", lowLimit, " minStartTS:", minStartTS, " newMinStartTS:", newMinStartTS)
// fmt.Println("innerTxnStartTsMap:", ib.innerTxnStartTsMap)
func TestInnerTxnStartTsBox(t *testing.T) {
// case1: store and delete
globalInnerTxnTsBox.storeInnerTxnTS(5)
Expand Down

0 comments on commit 98ffcc8

Please sign in to comment.