You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2012/09/07 23:24:07 UTC

[jira] [Created] (HDFS-3906) QJM: quorum timeout on failover with large log segment

Todd Lipcon created HDFS-3906:
---------------------------------

             Summary: QJM: quorum timeout on failover with large log segment
                 Key: HDFS-3906
                 URL: https://issues.apache.org/jira/browse/HDFS-3906
             Project: Hadoop HDFS
          Issue Type: Sub-task
    Affects Versions: QuorumJournalManager (HDFS-3077)
            Reporter: Todd Lipcon
            Assignee: Todd Lipcon
            Priority: Critical


In doing some stress tests, I ran into an issue with failover if the current edit log segment written by the old active is large. With a 327MB log segment containing 6.4M transactions, the JN took ~11 seconds to read and validate it during the recovery step. This was longer than the 10 second timeout for createNewEpoch, which caused the recovery to fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-3906) QJM: quorum timeout on failover with large log segment

Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452719#comment-13452719 ] 

Aaron T. Myers commented on HDFS-3906:
--------------------------------------

+1, the patch looks good to me, and I agree that the refactor makes things a little clearer.
                
> QJM: quorum timeout on failover with large log segment
> ------------------------------------------------------
>
>                 Key: HDFS-3906
>                 URL: https://issues.apache.org/jira/browse/HDFS-3906
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: QuorumJournalManager (HDFS-3077)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3906.txt
>
>
> In doing some stress tests, I ran into an issue with failover if the current edit log segment written by the old active is large. With a 327MB log segment containing 6.4M transactions, the JN took ~11 seconds to read and validate it during the recovery step. This was longer than the 10 second timeout for createNewEpoch, which caused the recovery to fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (HDFS-3906) QJM: quorum timeout on failover with large log segment

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon resolved HDFS-3906.
-------------------------------

       Resolution: Fixed
    Fix Version/s: QuorumJournalManager (HDFS-3077)
     Hadoop Flags: Reviewed

Committed to branch, thanks
                
> QJM: quorum timeout on failover with large log segment
> ------------------------------------------------------
>
>                 Key: HDFS-3906
>                 URL: https://issues.apache.org/jira/browse/HDFS-3906
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: QuorumJournalManager (HDFS-3077)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: QuorumJournalManager (HDFS-3077)
>
>         Attachments: hdfs-3906.txt
>
>
> In doing some stress tests, I ran into an issue with failover if the current edit log segment written by the old active is large. With a 327MB log segment containing 6.4M transactions, the JN took ~11 seconds to read and validate it during the recovery step. This was longer than the 10 second timeout for createNewEpoch, which caused the recovery to fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HDFS-3906) QJM: quorum timeout on failover with large log segment

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-3906:
------------------------------

    Attachment: hdfs-3906.txt

As predicted, solution #1 got complicated, so I want to defer that until later as an optimization.

This patch bumps the timeouts up to 2min for all of the operations which can result in log validation.

I also added logging to QuorumCall to make these longer timeouts more palatable. The new output in the case of a timeout looks like:

{code}
12/09/10 16:07:09 INFO namenode.FSEditLog: Starting log segment at 62036698
12/09/10 16:07:15 INFO client.QuorumJournalManager: Waited 6001 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:16 INFO client.QuorumJournalManager: Waited 7002 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:17 INFO client.QuorumJournalManager: Waited 8003 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:18 INFO client.QuorumJournalManager: Waited 9004 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:19 INFO client.QuorumJournalManager: Waited 10006 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:20 INFO client.QuorumJournalManager: Waited 11007 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:21 INFO client.QuorumJournalManager: Waited 12008 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:22 INFO client.QuorumJournalManager: Waited 13009 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:23 WARN client.QuorumJournalManager: Waited 14010 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:24 WARN client.QuorumJournalManager: Waited 15011 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:25 WARN client.QuorumJournalManager: Waited 16012 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:26 WARN client.QuorumJournalManager: Waited 17013 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:27 WARN client.QuorumJournalManager: Waited 18014 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:28 WARN client.QuorumJournalManager: Waited 19015 ms (timeout=20000 ms) for a response for startLogSegment(62036698)
12/09/10 16:07:29 FATAL namenode.FSEditLog: Error: starting log segment 62036698 failed for required journal (JournalAndStream(mgr=Quorum journal manager qjournal://localhost:13001;localhost:13002;localhost:13003/myjournal, stream=null))
java.io.IOException: Timed out waiting 20000ms for a quorum of nodes to respond.
{code}

(it starts logging at 30% of the configured timeout, then switches to WARN level at 70% of the configured timeout).

This patch also does a little refactoring so that all of the 'higher level operations' are done inside QuorumJournalManager.java, and AsyncLoggerSet is really just a simple shim to send out the various calls to all of the remote loggers. I think this is a bit cleaner looking and made sense for this patch to avoid having to pass the configuration into AsyncLoggerSet itself.
                
> QJM: quorum timeout on failover with large log segment
> ------------------------------------------------------
>
>                 Key: HDFS-3906
>                 URL: https://issues.apache.org/jira/browse/HDFS-3906
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: QuorumJournalManager (HDFS-3077)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3906.txt
>
>
> In doing some stress tests, I ran into an issue with failover if the current edit log segment written by the old active is large. With a 327MB log segment containing 6.4M transactions, the JN took ~11 seconds to read and validate it during the recovery step. This was longer than the 10 second timeout for createNewEpoch, which caused the recovery to fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-3906) QJM: quorum timeout on failover with large log segment

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450998#comment-13450998 ] 

Todd Lipcon commented on HDFS-3906:
-----------------------------------

There are two ways to solve this:

1) Avoid log validation during the recovery step

This has the advantage of a faster failover

2) Increase the default timeouts

Originally the timeouts were set pretty low (~10sec) because I didn't think about the O(n) nature of this step. It wouldn't be unreasonable to bump them to a couple minutes (only downside would be a slower failure case when a quorum is actually down).


I'm going to make an attempt at solution #1, but if it gets too complex, will punt and do solution #2.

                
> QJM: quorum timeout on failover with large log segment
> ------------------------------------------------------
>
>                 Key: HDFS-3906
>                 URL: https://issues.apache.org/jira/browse/HDFS-3906
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: QuorumJournalManager (HDFS-3077)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>
> In doing some stress tests, I ran into an issue with failover if the current edit log segment written by the old active is large. With a 327MB log segment containing 6.4M transactions, the JN took ~11 seconds to read and validate it during the recovery step. This was longer than the 10 second timeout for createNewEpoch, which caused the recovery to fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira