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
        20 kB
        Patrick Hunt
      2. ZOOKEEPER-1427.patch
        20 kB
        Patrick Hunt
      3. ZOOKEEPER-1427_br34.patch
        20 kB
        Patrick Hunt
      4. ZOOKEEPER-1427.patch
        20 kB
        Patrick Hunt
      5. ZOOKEEPER-1427_br34.patch
        21 kB
        Patrick Hunt
      6. ZOOKEEPER-1427.patch
        21 kB
        Patrick Hunt

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development