[ 
https://issues.apache.org/jira/browse/PHOENIX-3815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145787#comment-16145787
 ] 

Vincent Poon commented on PHOENIX-3815:
---------------------------------------

[~jamestaylor] now that we've lowered the index write timeout (PHOENIX-3948), I 
suppose TrackingWriter isn't as bad.  However, there are still some corner 
cases where it will be noticeably slower than ParallelWriter.  Imagine all 
threads in the writer pool (default of 10) are in use and there is heavy write 
traffic - the writes will then be executed serially as threads become 
available, and you'd have to wait for each to fail in the worst case where all 
indexes are failing.

But I think these might be relatively rare cases.  Also if the failure policy 
is to disable the index, then it doesn't matter too much.  Either way, we 
should at a minimum extract out the common code in the classes if we're not 
going to remove one - they pretty much do the same thing but use a different 
TaskRunner.

If the failure policy is to leave the index enabled, then you might care about 
failing fast, as you could face repeated failures if something is wrong with 
the index RS.  We could also have a rate counter for # of failures in a given 
time window.  If # of failures exceeds that, we fail fast like ParallelWriter.  
Otherwise, use TrackingWriter logic in the normal happy case.  But again, only 
matters if you plan to leave the index enabled.

> Only disable indexes on which write failures occurred
> -----------------------------------------------------
>
>                 Key: PHOENIX-3815
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3815
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Vincent Poon
>             Fix For: 4.12.0
>
>         Attachments: PHOENIX-3815.v1.patch
>
>
> We currently disable all indexes if any of them fail to be written to. We 
> really only should disable the one in which the write failed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to