Skip to content

Commit

Permalink
Stop do sync when sync is no need. (alibaba#5882)
Browse files Browse the repository at this point in the history
  • Loading branch information
KomachiSion authored May 28, 2021
1 parent 15c7183 commit 09c7293
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public boolean syncData(DistroData data, String targetServer) {
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);
Expand Down Expand Up @@ -123,6 +124,7 @@ public boolean syncVerifyData(DistroData verifyData, String targetServer) {
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);
Expand Down

0 comments on commit 09c7293

Please sign in to comment.