ishitadixit-dot commented on code in PR #2594:
URL: https://github.com/apache/phoenix/pull/2594#discussion_r3878926554
##########
phoenix-core-client/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:
##########
@@ -2557,6 +2605,9 @@ public MetaDataMutationResult createTable(final
List<Mutation> tableMetaData,
(tableType != PTableType.CDC) && ((tableType == PTableType.VIEW &&
physicalTableName != null)
|| (tableType != PTableType.VIEW && (physicalTableName == null ||
localIndexTable)))
) {
+ // PHOENIX-7788: recover from an orphaned disabled physical table before
ensureTableCreated
+ // runs modifyTable on it. See the helper for the metadata-preserving
contract.
+ reenableOrphanedDisabledHBaseTable(schemaBytes, tableBytes,
isNamespaceMapped, tableType);
Review Comment:
Thank you @sanjeet006py. I've added it in `ensureTableCreated`. Making it
usable for view-index tables would require us to strip _IDX_ first and then run
the checks. The current metadata lookup uses the physical name directly, which
works for base tables but not for view-index physicals (they're shared across
all view indexes on a parent and aren't row-keyed by their physical name in
SYSTEM.CATALOG).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]