[
https://issues.apache.org/jira/browse/PHOENIX-3237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15487944#comment-15487944
]
James Taylor commented on PHOENIX-3237:
---------------------------------------
Thanks for the patch, [[email protected]]. Good find - this is definitely an
issue.
+1 with one minor nit - change this so we don't allocate another String:
{code}
&& Bytes.compare(dataPTable.getName().getBytes(), dataTable) == 0
{code}
So essentially, each call to the method will process the indexes for one data
table, right? Seems like an improvement would be to collect up Map<PTable,
List<PTable>> for the dataTable and indexesNeedingRebuilding instead of having
just a single dataTable. Otherwise, the initial scan we're running is kind of
wasteful, since it'll go through the entire SYSTEM.CATALOG table only to
collect up the indexes for a single data table. Would you mind filing a JIRA
for this follow up work or ideally just do that work here?
> Automatic rebuild of disabled index will fail if indexes of two tables are
> disabled at the same time
> ----------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-3237
> URL: https://issues.apache.org/jira/browse/PHOENIX-3237
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.7.0
> Reporter: Ankit Singhal
> Assignee: Ankit Singhal
> Labels: index, rebuilding
> Fix For: 4.9.0, 4.8.1
>
> Attachments: PHOENIX-3237.patch
>
>
> There is a bug in automatic rebuild code where it seems to assume all
> disabled index corresponds to a single data table.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)