Skip to content

[BugFix] Support Fast Schema Evolution v2 for DELETE in shared-data #67456

Merged
xiangguangyxg merged 2 commits intoStarRocks:mainfrom
banmoy:schema_change_delete
Jan 14, 2026
Merged

[BugFix] Support Fast Schema Evolution v2 for DELETE in shared-data #67456
xiangguangyxg merged 2 commits intoStarRocks:mainfrom
banmoy:schema_change_delete

Conversation

@banmoy
Copy link
Contributor

@banmoy banmoy commented Jan 5, 2026

Why I'm doing:

DELETE needs to carry the table schema identity so BE can reliably interpret delete predicates under fast schema evolution v2, and update tablet metadata schema during publish when required.

What I'm doing:

  • Add schema_key to DeleteDataRequest (proto) to identify the table schema used to generate the delete predicate
  • FE: build TableSchemaKeyPB from db/table/base-index schema id in DeleteMgr, plumb it through LakeDeleteJob, and attach it to the delete RPC request
  • BE: accept optional schema_key in LakeServiceImpl::delete_data and persist it into the txn log via Tablet::delete_data(...)
  • Add backend lake delete gtest coverage for both “without schema key” (backward compatible) and “with schema key” (schema evolution v2)
  • Add frontend unit test to verify the delete request contains the expected schema key fields

Fixes #65706

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
    • This pr needs auto generate documentation
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.0
    • 3.5
    • 3.4
    • 3.3

Note

Enables DELETE to carry the table schema identity for fast schema evolution v2 while remaining backward compatible.

  • Proto: add optional schema_key to DeleteDataRequest in lake_service.proto
  • FE: build TableSchemaKeyPB in DeleteMgr, plumb through LakeDeleteJob, and set on DELETE RPC
  • BE: accept optional schema_key in LakeServiceImpl::delete_data and pass to Tablet::delete_data(...)
  • Storage: extend Tablet::delete_data to persist schema_key into op_write txn log
  • Tests: add BE lake delete tests (with/without schema_key) and FE unit test verifying request carries expected schema_key

Written by Cursor Bugbot for commit 01ac897. This will update automatically on new commits. Configure here.

@banmoy banmoy requested review from a team as code owners January 5, 2026 03:36
@github-actions github-actions bot added the 4.0 label Jan 5, 2026
@wanpengfei-git wanpengfei-git requested a review from a team January 5, 2026 03:36
@mergify mergify bot assigned banmoy Jan 5, 2026
@banmoy banmoy force-pushed the schema_change_delete branch from dd0b4d7 to e183c25 Compare January 5, 2026 07:44
@alvin-celerdata
Copy link
Contributor

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!

xiangguangyxg
xiangguangyxg previously approved these changes Jan 6, 2026
Signed-off-by: PengFei Li <lpengfei2016@gmail.com>
@banmoy banmoy force-pushed the schema_change_delete branch from e183c25 to afbb402 Compare January 6, 2026 12:03
Signed-off-by: PengFei Li <lpengfei2016@gmail.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 6, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

[FE Incremental Coverage Report]

pass : 8 / 8 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/lake/delete/LakeDeleteJob.java 3 3 100.00% []
🔵 com/starrocks/load/DeleteMgr.java 5 5 100.00% []

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

[BE Incremental Coverage Report]

pass : 5 / 5 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/service/service_be/lake_service.cpp 2 2 100.00% []
🔵 be/src/storage/lake/tablet.cpp 3 3 100.00% []

@alvin-celerdata
Copy link
Contributor

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!

@banmoy banmoy requested a review from xiangguangyxg January 7, 2026 03:05
@xiangguangyxg xiangguangyxg enabled auto-merge (squash) January 8, 2026 14:08
@xiangguangyxg xiangguangyxg merged commit 66de704 into StarRocks:main Jan 14, 2026
68 of 69 checks passed
@github-actions
Copy link
Contributor

@Mergifyio backport branch-4.0

@github-actions github-actions bot removed the 4.0 label Jan 14, 2026
@mergify
Copy link
Contributor

mergify bot commented Jan 14, 2026

backport branch-4.0

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Jan 14, 2026
…67456)

Signed-off-by: PengFei Li <lpengfei2016@gmail.com>
(cherry picked from commit 66de704)

# Conflicts:
#	be/test/CMakeLists.txt
banmoy added a commit to banmoy/starrocks that referenced this pull request Jan 14, 2026
banmoy added a commit to banmoy/starrocks that referenced this pull request Jan 14, 2026
banmoy added a commit to banmoy/starrocks that referenced this pull request Jan 14, 2026
alvin-celerdata pushed a commit that referenced this pull request Jan 14, 2026
…backport #67456) (#67875)

Signed-off-by: PengFei Li <lpengfei2016@gmail.com>
farhad-celo pushed a commit to farhad-celo/starrocks that referenced this pull request Jan 20, 2026
…tarRocks#67456)

Signed-off-by: PengFei Li <lpengfei2016@gmail.com>
Signed-off-by: Farhad Shahmohammadi <f.shahmohammadi@celonis.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Fast Scheme Evolution Performance in Shared-data

5 participants