Skip to content

[fix](binlog) Fix missing DELETE events in row binlog - #68034

Open
luwei16 wants to merge 1 commit into
apache:masterfrom
luwei16:fix/doris-28913-row-binlog-light-delete
Open

luwei16 wants to merge 1 commit into
apache:masterfrom
luwei16:fix/doris-28913-row-binlog-light-delete

Conversation

@luwei16

@luwei16 luwei16 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Predicate deletes only persist delete predicates and therefore cannot produce row-level DELETE events. A merge-on-write unique table with light delete enabled incorrectly used that path even when ROW binlog was enabled, leaving downstream consumers with stale rows. Route these deletes through row-bearing DELETE FROM USING execution, and reject any ROW-binlog predicate delete that still reaches the legacy handler.

Release note

Ensure DELETE on merge-on-write unique tables with ROW binlog emits row-level DELETE events even when light delete is enabled. Predicate DELETE on ROW-binlog tables now reports an explicit unsupported error.

Check List (For Author)

  • Test: Regression test, FE unit test, and manual test
    • Regression test: row_binlog_p0/test_row_binlog_mow_light_delete
    • Unit Test: org.apache.doris.nereids.trees.plans.commands.DeleteFromCommandTest
    • Manual test: verified ROW binlog DELETE events with historical values disabled and enabled
  • Behavior changed: Yes; MOW ROW-binlog deletes use row-bearing execution, while unsupported predicate deletes fail explicitly
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Predicate deletes only persist delete predicates and therefore cannot produce row-level DELETE events. A merge-on-write unique table with light delete enabled incorrectly used that path even when ROW binlog was enabled, leaving downstream consumers with stale rows. Route these deletes through row-bearing DELETE FROM USING execution, and reject any ROW-binlog predicate delete that still reaches the legacy handler.

### Release note

Ensure DELETE on merge-on-write unique tables with ROW binlog emits row-level DELETE events even when light delete is enabled. Predicate DELETE on ROW-binlog tables now reports an explicit unsupported error.

### Check List (For Author)

- Test: Regression test, FE unit test, and manual test
    - Regression test: row_binlog_p0/test_row_binlog_mow_light_delete
    - Unit Test: org.apache.doris.nereids.trees.plans.commands.DeleteFromCommandTest
    - Manual test: verified ROW binlog DELETE events with historical values disabled and enabled
- Behavior changed: Yes; MOW ROW-binlog deletes use row-bearing execution, while unsupported predicate deletes fail explicitly
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@luwei16

luwei16 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@luwei16 luwei16 changed the title [fix](fe) Emit row binlog events for MOW deletes [fix](binlog) Emit row binlog events for MOW deletes Sep 15, 2026
@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (2/2) 🎉
Increment coverage report
Complete coverage report

@luwei16 luwei16 changed the title [fix](binlog) Emit row binlog events for MOW deletes [fix](binlog) Fix missing DELETE events in row binlog Sep 16, 2026
@luwei16

luwei16 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at Sep 19th, 2026 8:24 AM.
Workflow run: https://github.com/apache/doris/actions/runs/35048497273

The selected account is excluded until 2026-09-19T08:24:00Z. Please trigger /review again; another configured account may be available.

@luwei16

luwei16 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

run performance

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.

4 participants