Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2877

If locking of a storage dir fails, it will remove the other NN's lock file on exit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0, 0.24.0, 1.0.0
    • Fix Version/s: 1.1.0, 0.22.1
    • Component/s: namenode
    • Labels:
      None

      Description

      In Storage.tryLock(), we call lockF.deleteOnExit() regardless of whether we successfully lock the directory. So, if another NN has the directory locked, then we'll fail to lock it the first time we start another NN. But our failed start attempt will still remove the other NN's lockfile, and a second attempt will erroneously start.

      1. hdfs-2877.txt
        2 kB
        Todd Lipcon

        Issue Links

          Activity

          Todd Lipcon created issue -
          Todd Lipcon made changes -
          Field Original Value New Value
          Link This issue is related to HDFS-1690 [ HDFS-1690 ]
          Todd Lipcon made changes -
          Link This issue is related to HDFS-2865 [ HDFS-2865 ]
          Todd Lipcon made changes -
          Attachment hdfs-2877.txt [ 12512884 ]
          Todd Lipcon made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Target Version/s 1.1.0, 0.23.1 [ 12317959, 12318885 ] 0.23.1, 1.1.0 [ 12318885, 12317959 ]
          Konstantin Shvachko made changes -
          Target Version/s 1.1.0, 0.23.1 [ 12317959, 12318885 ] 0.23.1, 1.1.0, 0.22.1 [ 12318885, 12317959, 12319241 ]
          Todd Lipcon made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags Reviewed [ 10343 ]
          Target Version/s 0.22.1, 1.1.0, 0.23.1 [ 12319241, 12317959, 12318885 ] 0.23.1, 1.1.0, 0.22.1 [ 12318885, 12317959, 12319241 ]
          Fix Version/s 0.24.0 [ 12317653 ]
          Fix Version/s 0.23.1 [ 12318885 ]
          Fix Version/s 1.1.0 [ 12317959 ]
          Fix Version/s 0.22.1 [ 12319241 ]
          Resolution Fixed [ 1 ]
          Todd Lipcon made changes -
          Link This issue is duplicated by HDFS-2632 [ HDFS-2632 ]
          Arun C Murthy made changes -
          Fix Version/s 0.24.0 [ 12317653 ]
          Fix Version/s 0.23.1 [ 12318885 ]
          Target Version/s 0.22.1, 1.1.0, 0.23.1 [ 12319241, 12317959, 12318885 ] 0.23.1, 1.1.0, 0.22.1 [ 12318885, 12317959, 12319241 ]
          Matt Foley made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development