Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-5014

BPOfferService#processCommandFromActor() synchronization on namenode RPC call delays IBR to Active NN, if Stanby NN is unstable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.4-alpha, 3.0.0-alpha1
    • 2.3.0
    • datanode, ha
    • None
    • Reviewed

    Description

      In one of our cluster, following has happened which failed HDFS write.

      1. Standby NN was unstable and continously restarting due to some errors. But Active NN was stable.
      2. MR Job was writing files.
      3. At some point SNN went down again while datanode processing the REGISTER command for SNN.
      4. Datanodes started retrying to connect to SNN to register at the following code in BPServiceActor#retrieveNamespaceInfo() which will be called under synchronization.

            try {
              nsInfo = bpNamenode.versionRequest();
              LOG.debug(this + " received versionRequest response: " + nsInfo);
              break;

      Unfortunately in all datanodes at same point this happened.
      5. For next 7-8 min standby was down, and no blocks were reported to active NN at this point and writes have failed.

      So culprit is BPOfferService#processCommandFromActor() is completely synchronized which is not required.

      Attachments

        1. HDFS-5014.patch
          13 kB
          Vinayakumar B
        2. HDFS-5014.patch
          13 kB
          Vinayakumar B
        3. HDFS-5014.patch
          10 kB
          Vinayakumar B
        4. HDFS-5014.patch
          9 kB
          Vinayakumar B
        5. HDFS-5014.patch
          8 kB
          Vinayakumar B
        6. HDFS-5014.patch
          2 kB
          Vinayakumar B
        7. HDFS-5014.patch
          1 kB
          Vinayakumar B
        8. HDFS-5014-v2.patch
          5 kB
          Vinayakumar B
        9. HDFS-5014-v2.patch
          5 kB
          Vinayakumar B
        10. HDFS-5014-v2.patch
          5 kB
          Vinayakumar B
        11. HDFS-5014-v2.patch
          4 kB
          Vinayakumar B
        12. HDFS-5014-v2.patch
          4 kB
          Vinayakumar B
        13. HDFS-5014-v2.patch
          3 kB
          Vinayakumar B

        Issue Links

          Activity

            People

              vinayakumarb Vinayakumar B
              vinayakumarb Vinayakumar B
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: