Skip to content

Fix table delete routing to region leaders - #18779

Merged
jt2594838 merged 2 commits into
apache:masterfrom
Caideyipi:fix/tdb-449-delete-routing
Sep 30, 2026
Merged

jt2594838 merged 2 commits into
apache:masterfrom
Caideyipi:fix/tdb-449-delete-routing

Conversation

@jt2594838

@jt2594838 jt2594838 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

In a 3-node cluster, table-model DELETE may return success without deleting any data.

The first replica in a Region replica set is not always the current IoTConsensus leader. When a DELETE request is routed to a non-leader
replica, the operation can silently have no effect.

Changes

  • Reorder Region replica lists in the ConfigNode response so the current leader is listed first.
  • Reorder a copy of the replica list without modifying persisted replica placement.
  • Add a 3-node table-model integration test that sends DELETE requests through each DataNode and verifies that the data is removed from
    every replica.

Validation

  • PartitionInfoTest: 4 tests passed
  • Spotless formatting check passed
  • git diff --check passed

@CRZbulabula CRZbulabula left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@jt2594838
jt2594838 merged commit df27bbc into apache:master Sep 30, 2026
40 of 45 checks passed
@jt2594838
jt2594838 deleted the fix/tdb-449-delete-routing branch September 30, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants