Conversation
Non-default keyspace group TSO services now read all keyspace group timestamps at startup and use the maximum value, ensuring TSO monotonicity without requiring metadata cleanup during TSO node start/stop operations. Signed-off-by: Jiale Lin <63439129+ljluestc@users.noreply.github.com>
Use the effective TSO timeout when resetting the dispatcher stream loop timer on each batch, so timeout behavior no longer falls back to pd-server-timeout. Add a dispatcher unit test that verifies stream-loop retries honor TSO timeout instead of the PD timeout, and align suite setup timeout defaults with the new semantics. Remove local PR description artifact from tracked files. Closes: tikv#9469 Signed-off-by: Jiale Lin <63439129+ljluestc@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @ljluestc. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
client: fix TSO stream-loop timeout reset
What problem does this PR solve?
Issue Number: Close #9469
What is changed and how does it work?
背景
在 #9469 中反馈:
tidb_backoff_weight未能影响 TSO timeout,而pd-client.pd-server-timeout对 TSO timeout 调整却有效,行为与预期不一致。问题分析
当前 TSO dispatcher 中:
GetTSOTimeout()作为 stream loop timer 的初值streamLoopTimer.Reset(option.Timeout)pd-server-timeout,导致 TSO timeout 配置(及其相关机制)无法持续生效修复方案
client/opt/option.go:新增 TSO timeout 配置能力TSOTimeout字段,默认 15 秒WithCustomTSOTimeoutOption()客户端选项GetTSOTimeout()方法,优先考虑 backoffer 的总时间限制client/clients/tso/dispatcher.go:修复超时重置逻辑streamLoopTimer.Reset(option.Timeout)改为streamLoopTimer.Reset(tsoTimeout)client/pkg/retry/backoff.go:支持 backoffer 总时间查询TotalTime()方法,暴露 backoffer 的总时间限制Check List
Tests
Code changes
Side effects
Related changes
pingcap/docs/pingcap/docs-cn:pingcap/tiup:Release note
变更文件
client/opt/option.goTSOTimeout、WithCustomTSOTimeoutOption()、GetTSOTimeout()client/clients/tso/dispatcher.gostreamLoopTimer.Reset()使用正确的 TSO timeoutclient/pkg/retry/backoff.goTotalTime()方法client/opt/option_test.goclient/clients/tso/dispatcher_test.go本地验证
所有测试通过。