Permalink
Browse files

Merge pull request #124 from shabanovd/develop

avoid conflicts between transaction's binary operations
  • Loading branch information...
2 parents 0fd2f63 + dbf7fec commit 142bed988de65f9e58ca84c7eae21d34957fb0dc @wolfgangmm wolfgangmm committed Jan 19, 2014
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/org/exist/storage/NativeBroker.java
View
10 src/org/exist/storage/NativeBroker.java
@@ -37,6 +37,7 @@
import java.util.Observer;
import java.util.Stack;
import java.util.StringTokenizer;
+import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -2072,6 +2073,15 @@ private File getCollectionFile(File dir,Txn transaction,XmldbURI uri,boolean cre
throw new IOException("Cannot make transaction filesystem directory: "+dir);
}
}
+
+ //XXX: replace by transaction operation id/number from Txn
+ //add unique id for operation in transaction
+ dir = new File(dir,"oper."+UUID.randomUUID().toString());
+ if (create && !dir.exists()) {
+ if (!dir.mkdir()) {
+ throw new IOException("Cannot make transaction filesystem directory: "+dir);
+ }
+ }
}
final XmldbURI [] segments = uri.getPathSegments();
File binFile = dir;

0 comments on commit 142bed9

Please sign in to comment.