Skip to content

Storage: Fix data race in DeltaMergeStore::checkSegmentUpdate#10459

Merged
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
JaySon-Huang:fix_race
Sep 26, 2025
Merged

Storage: Fix data race in DeltaMergeStore::checkSegmentUpdate#10459
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
JaySon-Huang:fix_race

Conversation

@JaySon-Huang
Copy link
Copy Markdown
Contributor

@JaySon-Huang JaySon-Huang commented Sep 26, 2025

What problem does this PR solve?

Issue Number: close #10455

Problem Summary:

What is changed and how it works?

Storage: Fix data race in `DeltaMergeStore::checkSegmentUpdate`

And add more debug log for flaky test RowKey.ToNextKeyIntHandle
https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftiflash%2Frelease-8.5%2Fpull_unit_test/detail/pull_unit_test/259/pipeline

�[0;33mNote: Google Test filter = RowKey.ToNextKeyIntHandle
�[m�[0;32m[==========] �[mRunning 1 test from 1 test case.
�[0;32m[----------] �[mGlobal test environment set-up.
�[0;32m[----------] �[m1 test from RowKey
�[0;32m[ RUN      ] �[mRowKey.ToNextKeyIntHandle
[2025/09/26 00:05:24.222 +08:00] [WARN] [RowKeyRangeFromRegion.cpp:110] ["Meet rowkey which has extra suffix, keyspace=4294967295 table_id=1  end_key=7480000000000000015F72800000000000001400 end_key_extra_suffix=00 "] [thread_id=1]
[2025/09/26 00:05:24.223 +08:00] [WARN] [RowKeyRangeFromRegion.cpp:110] ["Meet rowkey which has extra suffix, keyspace=4294967295 table_id=1  end_key=7480000000000000015F72800000000000001401 end_key_extra_suffix=01 "] [thread_id=1]
[2025/09/26 00:05:24.223 +08:00] [INFO] [gtest_key_range.cpp:199] ["key_end=7480000000000000015F728000000000000014 rand_suffix="] [thread_id=1]
/home/jenkins/agent/workspace/tiflash-build-common/tiflash/dbms/src/Storages/DeltaMerge/tests/gtest_key_range.cpp:209: Failure
Expected equality of these values:
  next.toRowKeyValueRef()
    Which is: 32-byte object <00-E4 10-FF 4A-7F 00-00 19-D8 F9-F7 4A-7F 00-00 08-00 00-00 00-00 00-00 15-00 00-00 00-00 00-00>
  range.getEnd()
    Which is: 32-byte object <00-21 67-12 00-00 00-00 D9-DB F9-F7 4A-7F 00-00 08-00 00-00 00-00 00-00 14-00 00-00 00-00 00-00>
/home/jenkins/agent/workspace/tiflash-build-common/tiflash/dbms/src/Storages/DeltaMerge/tests/gtest_key_range.cpp:210: Failure
Expected equality of these values:
  range.getEnd().toDebugString()
    Which is: "20"
  "21"
�[0;31m[  FAILED  ] �[mRowKey.ToNextKeyIntHandle (1 ms)
�[0;32m[----------] �[m1 test from RowKey (1 ms total)

�[0;32m[----------] �[mGlobal test environment tear-down
�[0;32m[==========] �[m1 test from 1 test case ran. (1 ms total)
�[0;32m[  PASSED  ] �[m0 tests.
�[0;31m[  FAILED  ] �[m1 test, listed below:
�[0;31m[  FAILED  ] �[mRowKey.ToNextKeyIntHandle

 1 FAILED TEST

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

None

Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
@ti-chi-bot ti-chi-bot Bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 26, 2025
@JaySon-Huang
Copy link
Copy Markdown
Contributor Author

/run-sanitizer-test tsan

@JaySon-Huang
Copy link
Copy Markdown
Contributor Author

/test pull-integration-next-gen

1 similar comment
@JaySon-Huang
Copy link
Copy Markdown
Contributor Author

/test pull-integration-next-gen

@ti-chi-bot ti-chi-bot Bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 26, 2025
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented Sep 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JinheLin, Lloyd-Pottiger

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [JinheLin,Lloyd-Pottiger]

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 26, 2025
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented Sep 26, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-09-26 07:03:56.63781979 +0000 UTC m=+599446.708313471: ☑️ agreed by Lloyd-Pottiger.
  • 2025-09-26 07:21:27.96901633 +0000 UTC m=+600498.039510013: ☑️ agreed by JinheLin.

@ti-chi-bot ti-chi-bot Bot merged commit 7f04d72 into pingcap:master Sep 26, 2025
8 checks passed
@JaySon-Huang JaySon-Huang deleted the fix_race branch September 26, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data race in DeltaMergeStore::checkSegmentUpdate

3 participants