You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Yang.Liu" <se...@huawei.com> on 2017/03/28 07:35:10 UTC

why leader replica does not call HdfsTransactionLog.finish

DistributedUpdateProcessor.java
  @Override
  public void finish() throws IOException {
    assert ! finished : "lifecycle sanity check";
    finished = true;
    
    if (zkEnabled) doFinish();
    
    if (next != null && nodes == null) next.finish();
  }

HdfsTranscationLog.finish() will call hflush or hsync to save tlog.
But when we have two replicas, the value of nodes is not equal to null. So,
next.finish() will not be executed.




--
View this message in context: http://lucene.472066.n3.nabble.com/why-leader-replica-does-not-call-HdfsTransactionLog-finish-tp4327139.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: why leader replica does not call HdfsTransactionLog.finish

Posted by "Yang.Liu" <se...@huawei.com>.
Thanks, Erick
I am not sure about hdfs transcation logs, it's intricate.



--
View this message in context: http://lucene.472066.n3.nabble.com/why-leader-replica-does-not-call-HdfsTransactionLog-finish-tp4327139p4327399.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: why leader replica does not call HdfsTransactionLog.finish

Posted by Erick Erickson <er...@gmail.com>.
I'm pretty sure that transaction logs are local to each replica.

On Tue, Mar 28, 2017 at 12:35 AM, Yang.Liu <se...@huawei.com> wrote:
> DistributedUpdateProcessor.java
>   @Override
>   public void finish() throws IOException {
>     assert ! finished : "lifecycle sanity check";
>     finished = true;
>
>     if (zkEnabled) doFinish();
>
>     if (next != null && nodes == null) next.finish();
>   }
>
> HdfsTranscationLog.finish() will call hflush or hsync to save tlog.
> But when we have two replicas, the value of nodes is not equal to null. So,
> next.finish() will not be executed.
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/why-leader-replica-does-not-call-HdfsTransactionLog-finish-tp4327139.html
> Sent from the Solr - User mailing list archive at Nabble.com.