Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: QuorumJournalManager (HDFS-3077)
    • Component/s: None
    • Labels:
      None

      Description

      In order for QJM to work with HA, the standby needs to be able to read from a JournalNode even when no active has written to it. In the current code, it reads the StorageInfo only when newEpoch() is called. But, that's only called when a writer becomes active. This causes the SBN to fail at startup since the JN thinks its storage info is uninitialized.

      1. hdfs-3693.txt
        10 kB
        Todd Lipcon

        Activity

        Hide
        Todd Lipcon added a comment -

        Committed to branch, with nit addressed in the commit. Thanks for reviewing.

        Show
        Todd Lipcon added a comment - Committed to branch, with nit addressed in the commit. Thanks for reviewing.
        Hide
        Aaron T. Myers added a comment -

        One tiny nit, you might want to put a space after ":" here:

        System.err.println("storage string:" + storageString);
        

        Otherwise the patch looks good to me. +1.

        Show
        Aaron T. Myers added a comment - One tiny nit, you might want to put a space after ":" here: System .err.println( "storage string:" + storageString); Otherwise the patch looks good to me. +1.
        Hide
        Todd Lipcon added a comment -

        Attached patch changes the StorageInfo to happen right when the journal is first accessed.

        If the journal is unformatted, then it waits until a writer becomes active to format it (since that writer is the one who provides the NamespaceInfo with which to format).

        The patch includes an update to the unit test to verify the improved behavior. A future functional test case which involves HA namenodes also depends on this, but this patch just has the targeted test.

        Show
        Todd Lipcon added a comment - Attached patch changes the StorageInfo to happen right when the journal is first accessed. If the journal is unformatted, then it waits until a writer becomes active to format it (since that writer is the one who provides the NamespaceInfo with which to format). The patch includes an update to the unit test to verify the improved behavior. A future functional test case which involves HA namenodes also depends on this, but this patch just has the targeted test.

          People

          • Assignee:
            Todd Lipcon
            Reporter:
            Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development