[
https://issues.apache.org/jira/browse/PHOENIX-5080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16732492#comment-16732492
]
Vincent Poon commented on PHOENIX-5080:
---------------------------------------
[~mihir6692] Another way would be to check the REPLAY_WRITES attribute with
PhoenixIndexMetadata#isIndexRebuild(). Then if it's a rebuild, do not
transition to ACTIVE.
I think that might be all we need to do? The code already transitions to
DISABLE if all retries are exhausted. And if we leave the state as
PENDING_DISABLE, the MetadataRegionObserver thread will transition to DISABLE
after a period of time.
> Index becomes Active during Partial Index Rebuilder if Index Failure happens
> ----------------------------------------------------------------------------
>
> Key: PHOENIX-5080
> URL: https://issues.apache.org/jira/browse/PHOENIX-5080
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.14.1
> Reporter: Monani Mihir
> Priority: Blocker
>
> After PHOENIX-4130 and PHOENIX-4600 , If there is Index failure during
> Partial Index Rebuild, Rebuilder will try again to write Index updates. If it
> succeeds then it will transition Index from INACTIVE to ACTIVE, even before
> Rebuilder finishes.
> Here is where it goes wrong, I think :-
> {code:java}
> PhoenixIndexFailurePolicy.java :-
> public static void doBatchWithRetries(MutateCommand mutateCommand,
> IndexWriteException iwe, PhoenixConnection connection,
> ReadOnlyProps config) throws IOException {
> ....
> while (canRetryMore(numRetry++, maxTries, canRetryUntil)) {
> ...
> handleIndexWriteSuccessFromClient(iwe, connection);
> ...
> }
> }
> ....
> private static void handleIndexWriteSuccessFromClient(IndexWriteException
> indexWriteException, PhoenixConnection conn) {
> handleExceptionFromClient(indexWriteException, conn,
> PIndexState.ACTIVE);
> }
> {code}
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)