[ https://issues.apache.org/jira/browse/PHOENIX-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16203090#comment-16203090 ]
James Taylor commented on PHOENIX-4242: --------------------------------------- Thinking about this more, I think we should start with PHOENIX-4263 to see what happens when an index failure occurs on an index on a view. I think it's likely that we'd fail to set the INDEX_DISABLE_TIMESTAMP in the first place, so the code you wrote will be for naught. We'll likely want to instead have a row in the SYSTEM CATALOG table that corresponds to the base/global index table row for all the indexes on a view. Then we'd have a single place to set the INDEX_STATE and INDEX_DISABLE_TIMESTAMP and indexes on views would essentially inherit that value. Or an alternative would be to set the INDEX_DISABLE_TIMESTAMP on the correct view index row, but we'd need to handle that in PhoenixIndexFailurePolicy.handleFailureWithExceptions() by figuring out the VIEW_INDEX_ID. The advantage of this approach is that we wouldn't be disabling all indexes on a view, but only the ones in which the write failures occurred. > Fix Indexer post-compact hook logging of NPE and TableNotFound > -------------------------------------------------------------- > > Key: PHOENIX-4242 > URL: https://issues.apache.org/jira/browse/PHOENIX-4242 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.12.0 > Reporter: Vincent Poon > Assignee: Vincent Poon > Attachments: PHOENIX-4242.v2.master.patch, > PHOENIX-4242.v3.master.patch, PHOENIX-4747.v1.master.patch > > > The post-compact hook in the Indexer seems to log extraneous log messages > indicating NPE or TableNotFound. The TableNotFound exceptions seem to > indicate actual table names prefixed with MERGE or RESTORE, and sometimes > suffixed with a digit, so perhaps these are views or something similar. > Examples: > 2017-09-28 13:35:03,118 WARN [ctions-1506410238599] index.Indexer - Unable > to permanently disable indexes being partially rebuild for SYSTEM.SEQUENCE > java.lang.NullPointerException > 2017-09-28 10:20:56,406 WARN [ctions-1506410238415] index.Indexer - Unable > to permanently disable indexes being partially rebuild for > MERGE_PLATFORM_ENTITY.PLATFORM_IMMUTABLE_ENTITY_DATA2 > org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table > undefined. tableName=MERGE_PLATFORM_ENTITY.PLATFORM_IMMUTABLE_ENTITY_DATA2 -- This message was sent by Atlassian JIRA (v6.4.14#64029)