[ https://issues.apache.org/jira/browse/PHOENIX-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15492569#comment-15492569 ]
Ankit Singhal commented on PHOENIX-3280: ---------------------------------------- Thanks [~giacomotaylor] , it looks good but have some minor comments. Instead, Existing PhoenixRuntime#getTableNoCache() can be used. {code} + + /** + * Get the latest table from the server, bypassing the client cache + * + * @param conn + * @param name + * @return + * @throws SQLException + */ + public static PTable forceGetTable(Connection conn, String name) throws SQLException { {code} Could be a existing bug, Shouldn't we clear mutations after executing them. {code} + if (mutations.size() == batchSize) { + dataHTable.batch(mutations); + uuidValue = ServerCacheClient.generateId(); } {code} Is the second version more optimized and can be used? {code} + List<PTable> indexesToPartiallyRebuild = Lists.newArrayListWithExpectedSize(dataPTable.getIndexes() + .size()); + List<PTable> oldIndexesToPartiallyRebuild = dataTableToIndexesMap.put(dataPTable, + indexesToPartiallyRebuild); + // If there already were indexes, then combine them with the new ones + if (oldIndexesToPartiallyRebuild != null) { + indexesToPartiallyRebuild.addAll(oldIndexesToPartiallyRebuild); + } indexesToPartiallyRebuild.add(indexPTable); {code} {code} + + List<PTable> oldIndexesToPartiallyRebuild= dataTableToIndexesMap.get(dataPTable); + if (oldIndexesToPartiallyRebuild == null) { + oldIndexesToPartiallyRebuild = Lists.newArrayListWithExpectedSize(dataPTable.getIndexes() + .size()); + dataTableToIndexesMap.put(dataPTable,indexesToPartiallyRebuild); + } oldIndexesToPartiallyRebuild.add(indexPTable); {code} please remove the comment as it is not valid now. {code} // we need to build indexes of same data table. so skip other indexes for this task. continue; {code} > Automatic attempt to rebuild all disabled index > ----------------------------------------------- > > Key: PHOENIX-3280 > URL: https://issues.apache.org/jira/browse/PHOENIX-3280 > Project: Phoenix > Issue Type: Bug > Reporter: James Taylor > Assignee: James Taylor > Fix For: 4.9.0, 4.8.1 > > Attachments: PHOENIX-3280.patch > > > Instead of only attempting to rebuild the first disabled index, we should > attempt to build each of them. Otherwise, a failure of the first one would > block the building of the others. This is follow up work for PHOENIX-3237 and > further improvements are identified in PHOENIX-3277. -- This message was sent by Atlassian JIRA (v6.3.4#6332)