Skip to content

Conversation

Tristan1900
Copy link
Contributor

@Tristan1900 Tristan1900 commented May 27, 2025

What problem does this PR solve?

Issue Number: close #61367

Problem Summary:

What changed and how does it work?

use Write CF commit TS to update DB Info and Table Info to make sure the updating ordering is correct in case of transaction conflicts.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 27, 2025
Copy link

tiprow bot commented May 27, 2025

Hi @Tristan1900. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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 kubernetes-sigs/prow repository.

Signed-off-by: Wenqi Mou <[email protected]>
Copy link

codecov bot commented May 27, 2025

Codecov Report

Attention: Patch coverage is 71.55172% with 66 lines in your changes missing coverage. Please review.

Project coverage is 74.9536%. Comparing base (32309b9) to head (d9e2a08).
Report is 66 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61366        +/-   ##
================================================
+ Coverage   73.1581%   74.9536%   +1.7954%     
================================================
  Files          1726       1727         +1     
  Lines        478264     491432     +13168     
================================================
+ Hits         349889     368346     +18457     
+ Misses       106905     100612      -6293     
- Partials      21470      22474      +1004     
Flag Coverage Δ
integration 46.2773% <61.6379%> (?)
unit 72.5173% <53.8793%> (+0.1000%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 62.5278% <71.5517%> (+14.9474%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Tristan1900
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented May 27, 2025

@Tristan1900: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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 kubernetes-sigs/prow repository.

Leavrth and others added 2 commits May 28, 2025 19:11
Signed-off-by: Jianjun Liao <[email protected]>
filter out not committed kv
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 28, 2025
Signed-off-by: Wenqi Mou <[email protected]>
Signed-off-by: Wenqi Mou <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 28, 2025
Signed-off-by: Wenqi Mou <[email protected]>
Signed-off-by: Wenqi Mou <[email protected]>
@@ -69,12 +71,20 @@ func (info *LogBackupTableHistoryManager) addHistory(id int64, locationInfo Tabl
// first occurrence - store as both original and current
info.tableNameHistory[id] = [2]TableLocationInfo{locationInfo, locationInfo}
} else {
info.tableNameHistory[id] = [2]TableLocationInfo{existing[0], locationInfo}
// only update if the new timestamp is newer than the current one
if locationInfo.Timestamp >= existing[1].Timestamp {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, only the write CF kv can trigger OnTableInfo or OnDatabase. Therefore, maybe it is always true.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 29, 2025
Signed-off-by: Wenqi Mou <[email protected]>
Copy link
Contributor

@3pointer 3pointer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest LGTM

tableId: tableId,
ts: rawWriteCFValue.GetStartTs(),
}
delete(tm.tempDefaultKVTableMap, idx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if count > 0 here is it still need to be deleted?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since using start ts as key, it's okay here.

but is it easy to cause OOM, we may need more tests here.

Copy link

ti-chi-bot bot commented May 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, Leavrth

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the lgtm label May 30, 2025
@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label May 30, 2025
Copy link

ti-chi-bot bot commented May 30, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-05-29 07:19:30.893484251 +0000 UTC m=+89791.955501873: ☑️ agreed by Leavrth.
  • 2025-05-30 06:26:53.002486195 +0000 UTC m=+173034.064503831: ☑️ agreed by 3pointer.

@3pointer
Copy link
Contributor

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 30, 2025
@3pointer
Copy link
Contributor

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 30, 2025
@Leavrth
Copy link
Contributor

Leavrth commented May 30, 2025

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label May 30, 2025
Copy link

ti-chi-bot bot commented May 30, 2025

@Tristan1900: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/unit-test d9e2a08 link true /test unit-test

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@Leavrth
Copy link
Contributor

Leavrth commented May 30, 2025

/retest

@ti-chi-bot ti-chi-bot bot merged commit 19d2a07 into pingcap:master May 30, 2025
32 of 33 checks passed
Tristan1900 added a commit to Tristan1900/tidb that referenced this pull request Jun 6, 2025
joechenrh pushed a commit to joechenrh/tidb that referenced this pull request Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

br: sort by TS when updating table history
3 participants