This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new fc640d9 Fixes event registered repeatedly for zookeeper (#8973)
fc640d9 is described below
commit fc640d90827eff6d24503ddd194dfa0962c8ccb3
Author: Haoran Meng <[email protected]>
AuthorDate: Mon Jan 11 14:47:05 2021 +0800
Fixes event registered repeatedly for zookeeper (#8973)
* Modify event type for drop resource
* Fixes event registered repeatedly for zookeeper
---
.../governance/repository/zookeeper/CuratorZookeeperRepository.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepository.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/govern
[...]
index 8dd6414..30a12e1 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepository.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepository.java
@@ -26,6 +26,7 @@ import org.apache.curator.framework.api.ACLProvider;
import org.apache.curator.framework.api.transaction.TransactionOp;
import org.apache.curator.framework.recipes.cache.ChildData;
import org.apache.curator.framework.recipes.cache.CuratorCache;
+import org.apache.curator.framework.recipes.cache.CuratorCache.Options;
import org.apache.curator.framework.recipes.cache.CuratorCacheListener;
import org.apache.curator.framework.recipes.locks.InterProcessLock;
import org.apache.curator.framework.recipes.locks.InterProcessMutex;
@@ -248,7 +249,7 @@ public final class CuratorZookeeperRepository implements
ConfigurationRepository
}
private void addCacheData(final String cachePath) {
- CuratorCache cache = CuratorCache.build(client, cachePath);
+ CuratorCache cache = CuratorCache.build(client, cachePath,
Options.SINGLE_NODE_CACHE);
try {
cache.start();
// CHECKSTYLE:OFF