summaryrefslogtreecommitdiffstats
path: root/node-repository
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2019-05-28 17:32:20 +0200
committerJon Marius Venstad <venstad@gmail.com>2019-05-28 17:32:20 +0200
commitc504d866ce2595255241130170972f31799e14f7 (patch)
tree2fb143ee932841bbc2e8df87ba7e4f1147a6d05e /node-repository
parent33ec86e7ddd01c693341145e990c4317cadbd749 (diff)
Invalidate cache only when paths are attempted created
Diffstat (limited to 'node-repository')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabase.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabase.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabase.java
index 2715b1131b3..e12cd3e53b9 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabase.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabase.java
@@ -95,8 +95,8 @@ public class CuratorDatabase {
/** Creates a path in curator and all its parents as necessary. If the path already exists this does nothing. */
void create(Path path) {
- curator.create(path);
- changeGenerationCounter.next(); // Increment counter to ensure getChildren sees any change.
+ if (curator.create(path))
+ changeGenerationCounter.next(); // Increment counter to ensure getChildren sees any change.
}
/** Returns whether given path exists */