summaryrefslogtreecommitdiffstats
path: root/zkfacade
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2024-06-10 14:39:25 +0200
committerjonmv <venstad@gmail.com>2024-06-10 14:39:25 +0200
commit2d3cd6957ffe77302019d22f676a3a6d7346ef5f (patch)
tree8f4dc498650afbb949ded3c97eb6bd47de829b88 /zkfacade
parent1478e54ecaffe8fffcbfdaf7fc853fb1578a36c5 (diff)
Non-functional changes]
Diffstat (limited to 'zkfacade')
-rw-r--r--zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java
index a74617a97eb..ba597d177c4 100644
--- a/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java
+++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java
@@ -228,7 +228,9 @@ public class Curator extends AbstractComponent implements AutoCloseable {
/** @see #create(Path, Duration) */
- public boolean create(Path path) { return create(path, null); }
+ public boolean create(Path path) {
+ return create(path, null);
+ }
/**
* Creates an empty node at a path, creating any parents as necessary.
@@ -262,7 +264,9 @@ public class Curator extends AbstractComponent implements AutoCloseable {
}
/**
- * Creates all the given paths in a single transaction. Any paths which already exists are ignored.
+ * Creates all the given paths in a single transaction. Any paths which already exists are ignored.<br>
+ * <em>No, this is <strong>NOT</strong> atomic, when viewed from other ZK clients!</em> Maybe it once was, but it is not anymore,
+ * unless ZK is configured to run commits and read in a single thread, which is not the default.
*/
public void createAtomically(Path... paths) {
try {
@@ -272,7 +276,7 @@ public class Curator extends AbstractComponent implements AutoCloseable {
transaction = transaction.create().forPath(path.getAbsolute(), new byte[0]).and();
}
}
- ((CuratorTransactionFinal)transaction).commit();
+ ((CuratorTransactionFinal) transaction).commit();
} catch (Exception e) {
throw new RuntimeException("Could not create " + Arrays.toString(paths), e);
}