Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: you06 <[email protected]>
  • Loading branch information
you06 committed Jan 8, 2025
1 parent 35157d6 commit 2076605
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions oracle/oracles/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,25 +273,6 @@ func (o *pdOracle) getTimestamp(ctx context.Context, txnScope string) (uint64, e
return oracle.ComposeTS(physical, logical), nil
}

func (o *pdOracle) getArrivalTimestamp() uint64 {
return oracle.GoTimeToTS(time.Now())
}

func (o *pdOracle) getMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) {
now := time.Now()

physical, logical, err := o.c.GetMinTS(ctx)
if err != nil {
return 0, errors.WithStack(err)
}
dist := time.Since(now)
if dist > slowDist {
logutil.Logger(ctx).Warn("get minimum timestamp too slow",
zap.Duration("cost time", dist))
}
return oracle.ComposeTS(physical, logical), nil
}

func (o *pdOracle) setLastTS(ts uint64, txnScope string) {
if txnScope == "" {
txnScope = oracle.GlobalTxnScope
Expand Down

0 comments on commit 2076605

Please sign in to comment.