You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Ishita Dixit (Jira)" <ji...@apache.org> on 2026/08/06 11:10:00 UTC
[jira] [Assigned] (PHOENIX-7788) CREATE TABLE fails with TableNotEnabledException when underlying HBase table exists but is disabled
[ https://issues.apache.org/jira/browse/PHOENIX-7788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ishita Dixit reassigned PHOENIX-7788:
-------------------------------------
Assignee: Ishita Dixit
> CREATE TABLE fails with TableNotEnabledException when underlying HBase table exists but is disabled
> ---------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-7788
> URL: https://issues.apache.org/jira/browse/PHOENIX-7788
> Project: Phoenix
> Issue Type: Improvement
> Affects Versions: 5.2.1, 5.3.0
> Reporter: Sanjeet Malhotra
> Assignee: Ishita Dixit
> Priority: Minor
>
> 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.
> This can happen if Phoenix metadata was lost or manually removed while the HBase table remained in a disabled state.The issue is that ensureTableCreated() in ConnectionQueryServicesImpl successfully detects and modifies the existing disabled HBase table, but never re-enables it. The SYSTEM.CATALOG metadata is written successfully, but the subsequent post-DDL scan fails because the table is still disabled.
> This also leaves the system in an inconsistent state: metadata exists in SYSTEM.CATALOG but the underlying HBase table remains disabled.
> Fix: ensureTableCreated() should detect when an existing HBase table is disabled and enable it before proceeding.
>
> How to Reproduce:
> # Create a Phoenix table normally
> # Delete its metadata from SYSTEM.CATALOG (DELETE FROM SYSTEM.CATALOG WHERE TABLE_NAME = '...')
> # Disable the HBase table via admin.disableTable()
> # Execute CREATE TABLE IF NOT EXISTS with the same DDL
> # Observe TableNotEnabledException
>
> We saw this in production when drop table succeeded to disable HBase table but failed to delete it, leaving HBase table in disabled state.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)