Skip to content

PHOENIX-7788 CREATE TABLE fails with TableNotEnabledException when un… - #2594

Open
ishitadixit-dot wants to merge 4 commits into
apache:masterfrom
ishitadixit-dot:PHOENIX-7788-reenable-disabled-hbase-table
Open

PHOENIX-7788 CREATE TABLE fails with TableNotEnabledException when un…#2594
ishitadixit-dot wants to merge 4 commits into
apache:masterfrom
ishitadixit-dot:PHOENIX-7788-reenable-disabled-hbase-table

Conversation

@ishitadixit-dot

Copy link
Copy Markdown
Contributor

When an HBase table exists and is disabled but has no corresponding Phoenix metadata in SYSTEM.CATALOG, executing CREATE TABLE IF NOT EXISTS fails with TableNotEnabledException.

JIRA: https://issues.apache.org/jira/browse/PHOENIX-7788

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Re-enables orphaned disabled HBase tables during Phoenix table creation.

Changes:

  • Detects disabled non-system HBase tables during creation.
  • Adds race-safe table enabling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sanjeet006py
sanjeet006py self-requested a review August 25, 2026 12:40
@virajjasani
virajjasani self-requested a review August 25, 2026 15:03
*/
private void reenableOrphanedDisabledHBaseTable(byte[] schemaBytes, byte[] tableBytes,
boolean isNamespaceMapped, PTableType tableType) throws SQLException {
if (tableType != PTableType.TABLE) {

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.

Should we return early for SYSTEM tables as well?

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.

3 participants