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

James Taylor commented on PHOENIX-3045:
---------------------------------------

So Indexer.java creates an IndexWriter specifically for recovery:
{code}
          recoveryWriter =
              new IndexWriter(recoveryCommmiter, policy, env, serverName + 
"-recovery-writer");
{code}
Can we pass in some state here (or have a derived class) that causes us to 
track (in a Set as you're doing in your patch) when a TableNotFoundException 
occurs when we try to get the HTableInterface? You'd need to propagate this 
state through the IndexCommitter interface for the ParallelWriterIndexCommitter 
class which makes this call:
{code}
                        HTableInterface table = 
factory.getTable(tableReference.get());
{code}
I think we'd want to not use CachingHTableFactory which seems to hold on to the 
HTableInterface:
{code}
        this.factory = new CachingHTableFactory(factory, cacheSize);
{code}
But instead use CoprocessorHTableFactory which seems to just get a new one. I'm 
really not sure what the CachingHTableFactory buys us - maybe we always use the 
CoprocessorHTableFactory instead? Do you remember, [~jesse_yates]?

Then, we'd only execute the batched mutation if we don't find the 
tableReference.get() in our Set<ImmutableBytesPtr>.

> Data regions in transition forever if RS holding them down during drop index
> ----------------------------------------------------------------------------
>
>                 Key: PHOENIX-3045
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3045
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Sergio Peleato
>            Assignee: Ankit Singhal
>             Fix For: 4.9.0
>
>         Attachments: PHOENIX-3045.patch
>
>
> There is a chance that region server holding the data regions might abruptly 
> killed before flushing the data table this leads same failure case that data 
> regions won't be opened which leads to the regions in transition forever. We 
> need to handle this case by checking dropped indexes on recovery write 
> failures and skip the corresponding mutations to write to them.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to