Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tikv: use timestamp from TSO instead of MaxVersion in point get retry #22789

Merged
merged 7 commits into from
Feb 22, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/master' into point-get-backoff
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
  • Loading branch information
sticnarf committed Feb 19, 2021
commit b6af3091aa3a0fac980ba35b920d9869d5b87132
9 changes: 1 addition & 8 deletions store/tikv/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,21 +403,14 @@ func (s *tikvSnapshot) get(ctx context.Context, bo *Backoffer, k kv.Key) ([]byte
}
})

cli := clientHelper{
LockResolver: s.store.lockResolver,
RegionCache: s.store.regionCache,
minCommitTSPushed: &s.minCommitTSPushed,
Client: s.store.client,
resolveLite: true,
}
cli := NewClientHelper(s.store, s.resolvedLocks)

// Secondary locks or async commit locks cannot be ignored when getting using the max version.
// So we concurrently get a TS from PD and use it in retries to avoid unnecessary blocking.
var tsFuture oracle.Future
if s.version == kv.MaxVersion {
tsFuture = s.store.oracle.GetTimestampAsync(ctx, &oracle.Option{TxnScope: s.txnScope})
}

failpoint.Inject("snapshotGetTSAsync", nil)

s.mu.RLock()
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.