Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
org.apache.zookeeper.server.persistence.FileTxnSnapLog has a potential for race condition:
if (!this.dataDir.exists()) {
if (!this.dataDir.mkdirs())
}
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