Skip to content

coprocessor: fix panic when _tidb_commit_ts column is placed before PK handle columns#19300

Merged
ti-chi-bot[bot] merged 1 commit intotikv:masterfrom
lcwangchao:fix_19299
Jan 21, 2026
Merged

coprocessor: fix panic when _tidb_commit_ts column is placed before PK handle columns#19300
ti-chi-bot[bot] merged 1 commit intotikv:masterfrom
lcwangchao:fix_19299

Conversation

@lcwangchao
Copy link
Contributor

What is changed and how it works?

Issue Number: Close #19299

What's Changed:

fix panic when _tidb_commit_ts column is placed before PK handle columns

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

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

Release note

None

Copilot AI review requested due to automatic review settings January 20, 2026 11:03
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 20, 2026
@lcwangchao lcwangchao force-pushed the fix_19299 branch 2 times, most recently from e996158 to 7d61378 Compare January 20, 2026 11:05
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a panic that occurs when the _tidb_commit_ts column is placed before PK handle columns in table scans. The fix ensures that commit_ts columns are treated with the same special handling as physical_table_id columns.

Changes:

  • Updated column vector construction logic to handle commit_ts columns with decoded format when placed before PK handles
  • Added a new integration test to specifically verify the fix for commit_ts columns before PK handles
  • Moved an existing test to the end of the file

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
components/tidb_query_executors/src/table_scan_executor.rs Fixed panic by adding commit_ts column check alongside physical_table_id column check in two locations where column types are determined
tests/integrations/coprocessor/test_select.rs Added new test for commit_ts column before PK handle scenario and moved existing test_batch_row_limit to end of file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lcwangchao lcwangchao force-pushed the fix_19299 branch 2 times, most recently from 492e4cb to 7a6eb68 Compare January 20, 2026 12:36
…K handle columns

Signed-off-by: Chao Wang <cclcwangchao@hotmail.com>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 21, 2026

@tiancaiamao: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

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

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jan 21, 2026
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 21, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, ekexium, tiancaiamao

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:

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 Jan 21, 2026
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 21, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-01-21 01:31:08.183691521 +0000 UTC m=+543895.797648377: ☑️ agreed by cfzjywxk.
  • 2026-01-21 01:48:49.750866563 +0000 UTC m=+544957.364823429: ☑️ agreed by ekexium.

@ti-chi-bot ti-chi-bot bot merged commit 3e01f6c into tikv:master Jan 21, 2026
9 checks passed
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Jan 21, 2026
@lcwangchao lcwangchao deleted the fix_19299 branch January 21, 2026 01:56
lcwangchao added a commit to lcwangchao/tikv that referenced this pull request Jan 21, 2026
…K handle columns (tikv#19300)

close tikv#19299

fix panic when _tidb_commit_ts column is placed before PK handle columns

Signed-off-by: Chao Wang <cclcwangchao@hotmail.com>
lcwangchao added a commit to lcwangchao/tikv that referenced this pull request Jan 29, 2026
…K handle columns (tikv#19300)

close tikv#19299

fix panic when _tidb_commit_ts column is placed before PK handle columns

Signed-off-by: Chao Wang <cclcwangchao@hotmail.com>
@lcwangchao lcwangchao mentioned this pull request Jan 29, 2026
9 tasks
wshwsh12 pushed a commit to wshwsh12/tikv that referenced this pull request Feb 9, 2026
…K handle columns (tikv#19300)

close tikv#19299

fix panic when _tidb_commit_ts column is placed before PK handle columns

Signed-off-by: Chao Wang <cclcwangchao@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

coprocessor: TableScan fails when _tidb_commit_ts column is placed before PK handle columns

5 participants