This is an automated email from the ASF dual-hosted git repository.
zhaojinchao 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 0d42ecb remove get data from curator cache (#15986)
0d42ecb is described below
commit 0d42ecb7b273466957f55a5c32d1826fd368db22
Author: Haoran Meng <[email protected]>
AuthorDate: Fri Mar 11 12:13:27 2022 +0800
remove get data from curator cache (#15986)
---
.../repository/cluster/zookeeper/CuratorZookeeperRepository.java | 5 -----
1 file changed, 5 deletions(-)
diff --git
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperRepository.java
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-prov
[...]
index 69d0b7e..759aa78 100644
---
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperRepository.java
+++
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperRepository.java
@@ -24,7 +24,6 @@ import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.framework.CuratorFrameworkFactory.Builder;
import org.apache.curator.framework.api.ACLProvider;
-import org.apache.curator.framework.recipes.cache.ChildData;
import org.apache.curator.framework.recipes.cache.CuratorCache;
import org.apache.curator.framework.recipes.cache.CuratorCacheListener;
import org.apache.curator.framework.recipes.cache.TreeCacheEvent;
@@ -129,10 +128,6 @@ public final class CuratorZookeeperRepository implements
ClusterPersistRepositor
@Override
public String get(final String key) {
- if (Optional.ofNullable(curatorCache).isPresent() &&
curatorCache.get(key).isPresent()) {
- Optional<ChildData> resultInCache = curatorCache.get(key);
- return null == resultInCache.get().getData() ? null : new
String(resultInCache.get().getData(), StandardCharsets.UTF_8);
- }
return getDirectly(key);
}