[
https://issues.apache.org/jira/browse/PHOENIX-6681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17570190#comment-17570190
]
ASF GitHub Bot commented on PHOENIX-6681:
-----------------------------------------
tkhurana commented on code in PR #1470:
URL: https://github.com/apache/phoenix/pull/1470#discussion_r928008986
##########
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java:
##########
@@ -2877,8 +2877,12 @@ public boolean isViewReferenced() {
Collections.reverse(columnMetadata);
tableMetaData.addAll(columnMetadata);
String dataTableName = parent == null || tableType ==
PTableType.VIEW ? null : parent.getTableName().getString();
- PIndexState defaultCreateState =
PIndexState.valueOf(connection.getQueryServices().getConfiguration().
- get(INDEX_CREATE_DEFAULT_STATE,
QueryServicesOptions.DEFAULT_CREATE_INDEX_STATE));
+ PIndexState defaultCreateState;
+ String defaultCreateStateString =
connection.getClientInfo(INDEX_CREATE_DEFAULT_STATE);
+ if (defaultCreateStateString == null) defaultCreateState =
PIndexState.valueOf(connection.getQueryServices().getConfiguration().
Review Comment:
Nit: We put braces for if even if single statement in if-else block and the
statements inside are on a separate line
> Enable new indexes to be optionally created in CREATE_DISABLED state
> ---------------------------------------------------------------------
>
> Key: PHOENIX-6681
> URL: https://issues.apache.org/jira/browse/PHOENIX-6681
> Project: Phoenix
> Issue Type: New Feature
> Reporter: Gokcen Iskender
> Assignee: Gokcen Iskender
> Priority: Major
>
> When we create/drop some indexes in one datacenter, the replication pair
> doesn't immediately have this index and Hbase throws a replication error when
> we try to write into indexes that don't have a matching table on the
> replication pair.
> To remediate this issue, we can optionally create them in CREATE_DISABLED
> state and enable them after all the replication peers have the table.
> Same is true for dropping indexes. When they are dropped we can first disable
> them and drop them later.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)