[ 
https://issues.apache.org/jira/browse/HDFS-16557?focusedWorklogId=764519&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-764519
 ]

ASF GitHub Bot logged work on HDFS-16557:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Apr/22 21:59
            Start Date: 29/Apr/22 21:59
    Worklog Time Spent: 10m 
      Work Description: xkrogen commented on code in PR #4219:
URL: https://github.com/apache/hadoop/pull/4219#discussion_r862193291


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java:
##########
@@ -1792,7 +1792,7 @@ private void checkForGaps(List<EditLogInputStream> 
streams, long fromTxId,
       EditLogInputStream elis = iter.next();
       if (elis.getFirstTxId() > txId) break;
       long next = elis.getLastTxId();

Review Comment:
   The local variable is redundant now, we can just update L1805 to be:
   ```java
   txId = elis.getLastTxId() + 1;
   ```





Issue Time Tracking
-------------------

    Worklog Id:     (was: 764519)
    Time Spent: 1h  (was: 50m)

> BootstrapStandby failed because of checking gap for inprogress 
> EditLogInputStream
> ---------------------------------------------------------------------------------
>
>                 Key: HDFS-16557
>                 URL: https://issues.apache.org/jira/browse/HDFS-16557
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Tao Li
>            Assignee: Tao Li
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2022-04-22-17-17-14-577.png, 
> image-2022-04-22-17-17-14-618.png, image-2022-04-22-17-17-23-113.png, 
> image-2022-04-22-17-17-32-487.png
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The lastTxId of an inprogress EditLogInputStream lastTxId isn't necessarily 
> HdfsServerConstants.INVALID_TXID. We can determine its status directly by 
> EditLogInputStream#isInProgress.
> We introduced [SBN READ], and set 
> {color:#ff0000}{{dfs.ha.tail-edits.in-progress=true}}{color}. Then 
> bootstrapStandby, the EditLogInputStream of inProgress is misjudged, 
> resulting in a gap check failure, which causes bootstrapStandby to fail.
> hdfs namenode -bootstrapStandby
> !image-2022-04-22-17-17-32-487.png|width=766,height=161!
> !image-2022-04-22-17-17-14-577.png|width=598,height=187!



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to