This is an automated email from the ASF dual-hosted git repository. hefengen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push: new e806f61ccb fix etcd sync config problem #5534 (#5535) e806f61ccb is described below commit e806f61ccbfe73f55e80afc34aa1d5c710503768 Author: aias00 <rok...@163.com> AuthorDate: Wed Apr 10 11:30:19 2024 +0800 fix etcd sync config problem #5534 (#5535) * fix etcd sync config problem #5534 * fix etcd sync config problem #5534 * fix etcd sync config problem #5534 --------- Co-authored-by: moremind <hefen...@apache.org> --- .../java/org/apache/shenyu/sync/data/etcd/EtcdSyncDataService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shenyu-sync-data-center/shenyu-sync-data-etcd/src/main/java/org/apache/shenyu/sync/data/etcd/EtcdSyncDataService.java b/shenyu-sync-data-center/shenyu-sync-data-etcd/src/main/java/org/apache/shenyu/sync/data/etcd/EtcdSyncDataService.java index a9aadff192..407e9b7239 100644 --- a/shenyu-sync-data-center/shenyu-sync-data-etcd/src/main/java/org/apache/shenyu/sync/data/etcd/EtcdSyncDataService.java +++ b/shenyu-sync-data-center/shenyu-sync-data-etcd/src/main/java/org/apache/shenyu/sync/data/etcd/EtcdSyncDataService.java @@ -80,8 +80,10 @@ public class EtcdSyncDataService extends AbstractPathDataSyncService { final List<String> childrenKeys = etcdClient.getChildrenKeys(registerPath, "/"); if (!ObjectUtils.isEmpty(childrenKeys)) { childrenKeys.forEach(nodePath -> { - final String nodeData = etcdClient.get(String.join(Constants.PATH_SEPARATOR, registerPath, nodePath)); - super.event(nodePath, nodeData, registerPath, EventType.PUT); + // fix the update path + String updatePath = String.join(Constants.PATH_SEPARATOR, registerPath, nodePath); + final String nodeData = etcdClient.get(updatePath); + super.event(updatePath, nodeData, registerPath, EventType.PUT); }); } } catch (Exception e) {