Skip to content

HBASE-30539 CreateTableProcedure ignores failed table descriptor write (branch-2) - #8879

Open
Umeshkumar9414 wants to merge 2 commits into
apache:branch-2from
Umeshkumar9414:HBASE-30539-branch-2
Open

Umeshkumar9414 wants to merge 2 commits into
apache:branch-2from
Umeshkumar9414:HBASE-30539-branch-2

Conversation

@Umeshkumar9414

Copy link
Copy Markdown
Contributor

Backport of the master change #8877 to branch-2.

JIRA: https://issues.apache.org/jira/browse/HBASE-30539

FSTableDescriptors.writeTableDescriptor used to return null after 10 failed attempts, and CreateTableProcedure ignored that, so the create moved on to hbase:meta and region assignment with no .tableinfo on HDFS. The region server then failed every open with Missing table descriptor and the assign procedure retried forever. writeTableDescriptor now throws IOException after the last attempt (failed attempts logged at WARN), so the create procedure stays in WRITE_FS_LAYOUT and retries.

The cherry-pick from master had three cosmetic conflicts in FSTableDescriptors.java (the hbase:meta log line and two javadoc hunks), resolved by keeping this branch's log line and taking the new javadoc. The main logic is identical to master. In the test, HBaseTestingUtil is renamed to HBaseTestingUtility, which is the name on this branch.

Tests run locally on this branch (-Dhadoop.profile=3.0) and passing: TestCreateTableProcedureDescriptorWriteFailure (3), TestFSTableDescriptors, TestCreateTableProcedure, TestCloneSnapshotProcedure, TestMasterRegionInitialize.

Co-authored-by: Claude Sonnet 5.5 noreply@anthropic.com

Umeshkumar9414 and others added 2 commits November 13, 2026 17:44
FSTableDescriptors.writeTableDescriptor retried 10 times, logged every
failure at DEBUG and then returned null. CreateTableProcedure.createFsLayout
ignored the result, so a failed .tableinfo write still let the procedure go on
to ADD_TO_META and ASSIGN_REGIONS. Region servers then failed every open with
"Missing table descriptor", the TRSP retried forever and the create procedure
stayed in ASSIGN_REGIONS holding the table lock.

Make writeTableDescriptor throw IOException (with the last failure as cause)
once all attempts are exhausted, and log failed attempts at WARN. The create
procedure now stays in WRITE_FS_LAYOUT and retries, and the other callers that
ignored the result (clone snapshot, snapshot manifest, MasterRegion, backup)
no longer silently continue either. createTableDescriptorForTableDirectory
returns false only when an equal descriptor already exists.

Backport of the master change (apache#8877) to branch-2.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…riptorWriteFails

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant