diff --git a/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/MicroServiceFileSyncer.java b/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/MicroServiceFileSyncer.java index d7ba5a18..da7fa8b9 100644 --- a/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/MicroServiceFileSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/MicroServiceFileSyncer.java @@ -106,6 +106,9 @@ protected String getResource(SyncConfig config) { @Override protected boolean updateOnce(List value, FileDigest meta) { + if (value != null && !value.isEmpty()) { + value.forEach(s -> s.own(o -> o.own(getName()))); + } GovernancePolicy expect = policySupervisor.getPolicy(); GovernancePolicy update = expect == null ? new GovernancePolicy() : expect.copy(); update.setServices(value);