You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/06/09 04:53:24 UTC

[GitHub] [hadoop] ZanderXu commented on pull request #4219: HDFS-16557. BootstrapStandby failed because of checking gap for inprogress EditLogInputStream

ZanderXu commented on PR #4219:
URL: https://github.com/apache/hadoop/pull/4219#issuecomment-1150668804

   Thanks @tomscut , after tracing the code, I think we cannot add `elis.isInProgress()`.
   
   And I will explain my ideas trough questions and answers. 
   **Question one: Why was INVALID_TXID considered in the original code?**
   - CheckForGaps method is used to check whether streams contains continuous TXids from fromTxId to toAtLeastTxid
   - LastTxId equals INVALID_TXID means the stream is in progress
   - toAtLeastTxid maybe abnormal value, like Long.MaxValue.  So the CheckForGaps method only need to cover the latest inprogress segment.
   
   **Question two: What is the difference between INVALID_TXID and is InProgress()?**
   - Before introducing [SBN READ], LastTxId equals INVALID_TXID means the stream is in progress. And stream is in progress means it's lastTxId is INVALID_TXID.
   - But after introducing [SBN READ], LastTxId equals INVALID_TXID means the stream is in progress. But stream is in progress cannot mean it's lastTxId is INVALID_TXID. Because introducing getJournaledEdits.
   - So if we add `elis.isInProgress()` in CheckForGaps, it cannot cover the last writing segments which actual contains latest edit.
   
   Please correct me if anything is wrong.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org