KVStore: fix tiflash_raft_throughput_bytes warp problem#10700
KVStore: fix tiflash_raft_throughput_bytes warp problem#10700ti-chi-bot[bot] merged 6 commits intopingcap:masterfrom
Conversation
📝 WalkthroughWalkthroughAdds a guarded local updater in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@dbms/src/Storages/KVStore/MultiRaft/RaftCommands.cpp`:
- Around line 385-398: The code mixes signed payload with unsigned write_size
causing wrap/overflow; fix by treating payload as a signed integer before doing
arithmetic: capture payload from doInsert into a signed type (e.g., long long)
such as payload_signed = static_cast<long long>(... .payload), then if
(payload_signed > 0) do write_size += static_cast<size_t>(payload_signed); else
if (write_size >= static_cast<size_t>(-payload_signed)) do write_size -=
static_cast<size_t>(-payload_signed). Apply this change in both branches that
call doInsert (the blocks guarded by is_v2 and the else), referencing doInsert,
payload, write_size and DupCheck.
Co-authored-by: JaySon <tshent@qq.com>
Co-authored-by: JaySon <tshent@qq.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, JinheLin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
|
/cherry-pick release-8.5 |
|
@JaySon-Huang: new pull request created to branch DetailsIn response to this:
Instructions 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 ti-community-infra/tichi repository. |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
close pingcap#10701 Signed-off-by: Calvin Neo <calvinneo1995@gmail.com> Co-authored-by: JaySon <tshent@qq.com>
) close #10701 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io> Signed-off-by: JaySon-Huang <tshent@qq.com> Co-authored-by: Calvin Neo <CalvinNeo@users.noreply.github.com> Co-authored-by: JaySon-Huang <tshent@qq.com>
What problem does this PR solve?
Issue Number: close #10701
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Summary by CodeRabbit