Uploaded image for project: 'Giraph'
  1. Giraph
  2. GIRAPH-1076

Race condition in FileTxnSnapLog

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None

      Description

      org.apache.zookeeper.server.persistence.FileTxnSnapLog has a potential for race condition:

      if (!this.dataDir.exists()) {
      if (!this.dataDir.mkdirs())

      { throw new IOException("Unable to create data directory " + this.dataDir); }

      }

      If two threads try to create FileTxnSnapLog simultaneously it can trigger IOException.
      We saw this happening in Giraph where FileTxnSnapLog is being created by PurgeTask created by DatadirCleanupManager and by InProcessZooKeeperRunner#runFromConfig

        Attachments

          Activity

            People

            • Assignee:
              edunov Sergey Edunov
              Reporter:
              edunov Sergey Edunov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: