Stop do sync when sync is no need. (#5882)

This commit is contained in:
杨翊 SionYang 2021-05-28 14:08:25 +08:00 committed by GitHub
parent 15c71831e7
commit 09c7293085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,6 +87,7 @@ public class DistroClientTransportAgent implements DistroTransportAgent {
public void syncData(DistroData data, String targetServer, DistroCallback callback) {
if (isNoExistTarget(targetServer)) {
callback.onSuccess();
return;
}
DistroDataRequest request = new DistroDataRequest(data, data.getType());
Member member = memberManager.find(targetServer);
@ -123,6 +124,7 @@ public class DistroClientTransportAgent implements DistroTransportAgent {
public void syncVerifyData(DistroData verifyData, String targetServer, DistroCallback callback) {
if (isNoExistTarget(targetServer)) {
callback.onSuccess();
return;
}
DistroDataRequest request = new DistroDataRequest(verifyData, DataOperation.VERIFY);
Member member = memberManager.find(targetServer);