phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [phoenix] gokceni commented on a change in pull request #499: Phoenix-5272 ALTER INDEX REBUILD ALL
Date Thu, 23 May 2019 18:18:42 GMT
gokceni commented on a change in pull request #499: Phoenix-5272 ALTER INDEX REBUILD ALL 

 File path: phoenix-core/src/main/java/org/apache/phoenix/schema/
 @@ -4362,18 +4365,40 @@ public MutationState alterIndex(AlterIndexStatement statement) throws
                     // Set so that we get the table below with the potentially modified rowKeyOrderOptimizable
flag set
                     if (newIndexState == PIndexState.BUILDING && isAsync) {
-                        try {
-                            tableUpsert = connection.prepareStatement(UPDATE_INDEX_REBUILD_ASYNC_STATE);
-                            tableUpsert.setString(1,
-                                    connection.getTenantId() == null ? null : connection.getTenantId().getString());
-                            tableUpsert.setString(2, schemaName);
-                            tableUpsert.setString(3, indexName);
-                            tableUpsert.setLong(4, result.getTable().getTimeStamp());
-                            tableUpsert.execute();
-                            connection.commit();
-                        } finally {
-                            if (tableUpsert != null) {
-                                tableUpsert.close();
+                        if (isRebuildAll) {
+                            List<Task.TaskRecord> tasks = Task.queryTaskTable(connection,
schemaName, tableName, PTable.TaskType.INDEX_REBUILD,
 Review comment:
   It seems like it is data table name. This is the ALTER INDEX statement though. We are changing
1 index and rebuilding it. The task table check makes sure that we don't already have this
in the task table (index can be built from the gus case, we don't want to kick one from gus
and run Alter with rebuild too) The task table record will get deleted in 10 days (TTL).

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.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

View raw message