ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1427

Writing to local files is done non-atomically

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.4.3
    • Fix Version/s: 3.4.4, 3.5.0
    • Component/s: server
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently, the writeLongToFile() function opens the file for truncate, writes the new data, syncs, and then closes. If the process crashes after opening the file but before writing the new data, the file may be left empty, causing ZK to "forget" an earlier promise. Instead, it should use RandomAccessFile to avoid truncating.

      1. ZOOKEEPER-1427_br34.patch
        21 kB
        Patrick Hunt
      2. ZOOKEEPER-1427_br34.patch
        20 kB
        Patrick Hunt
      3. ZOOKEEPER-1427_br34.patch
        20 kB
        Patrick Hunt
      4. ZOOKEEPER-1427.patch
        21 kB
        Patrick Hunt
      5. ZOOKEEPER-1427.patch
        20 kB
        Patrick Hunt
      6. ZOOKEEPER-1427.patch
        20 kB
        Patrick Hunt

        Activity

        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Resolution Fixed [ 1 ]
        Patrick Hunt made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Patrick Hunt made changes -
        Attachment ZOOKEEPER-1427.patch [ 12535016 ]
        Patrick Hunt made changes -
        Attachment ZOOKEEPER-1427_br34.patch [ 12535015 ]
        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Patrick Hunt made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Patrick Hunt made changes -
        Attachment ZOOKEEPER-1427.patch [ 12534090 ]
        Patrick Hunt made changes -
        Attachment ZOOKEEPER-1427_br34.patch [ 12534089 ]
        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Patrick Hunt made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Patrick Hunt made changes -
        Attachment ZOOKEEPER-1427.patch [ 12534071 ]
        Patrick Hunt made changes -
        Attachment ZOOKEEPER-1427_br34.patch [ 12534070 ]
        Patrick Hunt made changes -
        Assignee Patrick Hunt [ phunt ]
        Patrick Hunt made changes -
        Fix Version/s 3.5.0 [ 12316644 ]
        Patrick Hunt made changes -
        Field Original Value New Value
        Fix Version/s 3.4.4 [ 12319841 ]
        Priority Major [ 3 ] Critical [ 2 ]
        Todd Lipcon created issue -

          People

          • Assignee:
            Patrick Hunt
            Reporter:
            Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development