ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1833 fix windows build
  3. ZOOKEEPER-1459

Standalone ZooKeeperServer is not closing the transaction log files on shutdown

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.6, 3.5.0
    • Component/s: server
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change

      Description

      When shutdown the standalone ZK server, its only clearing the zkdatabase and not closing the transaction log streams. When tries to delete the temporary files in unit tests on windows, its failing.
      ZooKeeperServer.java

              if (zkDb != null) {
                  zkDb.clear();
              }
      

      Suggestion to close the zkDb as follows, this inturn will take care transaction logs:

              if (zkDb != null) {
                  zkDb.clear();
                  try {
                      zkDb.close();
                  } catch (IOException ie) {
                      LOG.warn("Error closing logs ", ie);
                  }
              }
      
      1. ZOOKEEPER-1459.patch
        3 kB
        Rakesh R
      2. ZOOKEEPER-1459.patch
        4 kB
        Rakesh R
      3. ZOOKEEPER-1459.patch
        4 kB
        David Lao
      4. ZOOKEEPER-1459.patch
        1 kB
        David Lao
      5. ZOOKEEPER-1459.patch
        4 kB
        Rakesh R
      6. ZOOKEEPER-1459.patch
        1 kB
        Rakesh R
      7. ZOOKEEPER-1459.patch
        1 kB
        Rakesh R
      8. ZOOKEEPER-1459.patch
        0.6 kB
        Rakesh R
      9. ZOOKEEPER-1459-branch-3_4.patch
        3 kB
        Rakesh R
      10. ZOOKEEPER-1459-branch-3_4.patch
        4 kB
        Rakesh R

        Activity

        Rakesh R created issue -
        Rakesh R made changes -
        Field Original Value New Value
        Attachment ZOOKEEPER-1459.patch [ 12525047 ]
        Rakesh R made changes -
        Assignee Rakesh R [ rakeshr ]
        Rakesh R made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hadoop Flags Incompatible change [ 10342 ]
        Fix Version/s 3.4.3 [ 12319288 ]
        Patrick Hunt made changes -
        Fix Version/s 3.5.0 [ 12316644 ]
        Rakesh R made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Patrick Hunt made changes -
        Fix Version/s 3.4.6 [ 12323310 ]
        Fix Version/s 3.4.3 [ 12319288 ]
        Camille Fournier made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Rakesh R made changes -
        Attachment ZOOKEEPER-1459.patch [ 12606715 ]
        Rakesh R made changes -
        Attachment ZOOKEEPER-1459.patch [ 12606716 ]
        Rakesh R made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Rakesh R made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Rakesh R made changes -
        Attachment ZOOKEEPER-1459.patch [ 12607524 ]
        Rakesh R made changes -
        Description When shutdown the standalone ZK server, its only clearing the zkdatabase and not closing the transaction log streams. This will leaks the transaction log streams.
        ZooKeeperServer.java
        {noformat}
                if (zkDb != null) {
                    zkDb.clear();
                }
        {noformat}

        Suggestion to close the zkDb as follows, this inturn will take care transaction logs:
        {noformat}
                if (zkDb != null) {
                    zkDb.clear();
                    try {
                        zkDb.close();
                    } catch (IOException ie) {
                        LOG.warn("Error closing logs ", ie);
                    }
                }
        {noformat}
        When shutdown the standalone ZK server, its only clearing the zkdatabase and not closing the transaction log streams. When tries to delete the temporary files in unit tests on windows, its failing.
        ZooKeeperServer.java
        {noformat}
                if (zkDb != null) {
                    zkDb.clear();
                }
        {noformat}

        Suggestion to close the zkDb as follows, this inturn will take care transaction logs:
        {noformat}
                if (zkDb != null) {
                    zkDb.clear();
                    try {
                        zkDb.close();
                    } catch (IOException ie) {
                        LOG.warn("Error closing logs ", ie);
                    }
                }
        {noformat}
        David Lao made changes -
        Attachment ZOOKEEPER-1459.patch [ 12610271 ]
        David Lao made changes -
        Attachment ZOOKEEPER-1459.patch [ 12610294 ]
        Rakesh R made changes -
        Attachment ZOOKEEPER-1459.patch [ 12610310 ]
        Flavio Junqueira made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Rakesh R made changes -
        Attachment ZOOKEEPER-1459-branch-3_4.patch [ 12616339 ]
        Rakesh R made changes -
        Attachment ZOOKEEPER-1459.patch [ 12616986 ]
        Rakesh R made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Rakesh R made changes -
        Attachment ZOOKEEPER-1459-branch-3_4.patch [ 12617195 ]
        Flavio Junqueira made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rakesh R made changes -
        Parent ZOOKEEPER-1833 [ 12683243 ]
        Issue Type Bug [ 1 ] Sub-task [ 7 ]
        Flavio Junqueira made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Rakesh R
            Reporter:
            Rakesh R
          • Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development