Skip to content

[client] Abort write batch if table id changes.#2747

Open
loserwang1024 wants to merge 1 commit intoapache:mainfrom
loserwang1024:fix-write-new-table-id
Open

[client] Abort write batch if table id changes.#2747
loserwang1024 wants to merge 1 commit intoapache:mainfrom
loserwang1024:fix-write-new-table-id

Conversation

@loserwang1024
Copy link
Contributor

Purpose

Linked issue: close #2746

Brief change log

Tests

API and Format

Documentation

@loserwang1024
Copy link
Contributor Author

loserwang1024 commented Feb 28, 2026

Comment on lines 416 to 419
new InvalidTableException(
String.format(
"Table ID changed from %d to %d for table path %s",
bucketAndWriteBatches.tableId, tableBucket.getTableId(), path));
Copy link
Member

Choose a reason for hiding this comment

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

  1. Throw a TableNotExistException for this scenario and ensure stackTraceEnabled is set to true when instantiating the exception.
  2. Update the error message to explicitly state that the table has been re-created, indicating that further writes to this table instance cannot proceed.

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.

If table id is changed, sender will send request to wrong bucket.

2 participants