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

Log Backup: Advancer cannot resolve lock when memory lock is not nil. #57134

Open
3pointer opened this issue Nov 5, 2024 · 1 comment · May be fixed by #57178
Open

Log Backup: Advancer cannot resolve lock when memory lock is not nil. #57134

3pointer opened this issue Nov 5, 2024 · 1 comment · May be fixed by #57178

Comments

@3pointer
Copy link
Contributor

3pointer commented Nov 5, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

To reproduce this issue:

  1. In a log backup cluster, ensure there is an existing lock and trigger the advancer to resolve the lock on specific regions.
  2. Ensure the region contains a new lock ts in memory(from another new transaction).

2. What did you expect to see? (Required)

Resolve Lock success

3. What did you see instead (Required)

Resolve Lock Failed, wait for next round.

resolve locks failed, wait for next tick"",""category"":""advancer"",""uuid"":""log backup advancer"",""error"":""unexpected scanlock error: error:<locked:<primary_lock:xxx

4. What is your TiDB version? (Required)

master

@3pointer
Copy link
Contributor Author

3pointer commented Nov 5, 2024

TiKV has an assumption: when any lock exists in memory less than max_ts, report Key is locked.

https://github.com/tikv/tikv/blob/37dfba1b046ebf308db972af0a3a788b7132244c/src/storage/mod.rs#L1634-L1641

We may need to adjust max_ts in the client from MaxUint64 to an appropriate range—greater than the lock ts but as small as feasible.

https://github.com/pingcap/tidb/blob/8a62d5a7bce32e56e22a8d17e85a086a2ceb1fd2/br/pkg/streamhelper/advancer.go#L691C17-L691C31

@3pointer 3pointer linked a pull request Nov 6, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant