rewrite changelog only if update updates

This commit is contained in:
2024-06-30 20:30:33 +02:00
parent 65d7a0a288
commit 82bd5a577a
3 changed files with 7 additions and 5 deletions

View File

@@ -115,11 +115,13 @@ public class SyncHandler {
// md.getBestVersion() > md.getTotalVersion() should also work
if (receivedTotalVer > md.getOurVersion()) {
invalidate.apply();
md.getChangelog().clear();
md.getChangelog().putAll(receivedMap);
md.getChangelog().putIfAbsent(persistentRemoteHostsService.getSelfUuid(), 0L);
return false;
}
md.getChangelog().clear();
md.getChangelog().putAll(receivedMap);
md.getChangelog().putIfAbsent(persistentRemoteHostsService.getSelfUuid(), 0L);
Log.warn("No action on update: " + header.getName() + " from " + from);
return false;
});

View File

@@ -44,7 +44,7 @@ public class DhfsFuseIT {
"-Ddhfs.objects.distributed.peerdiscovery.interval=100",
"-Ddhfs.objects.distributed.invalidation.delay=100",
"-Ddhfs.objects.ref_verification=true",
"-Dquarkus.log.category.\"com.usatiuk.dhfs\".level=TRACE",
"-Dquarkus.log.category.\\\"com.usatiuk.dhfs\\\".level=TRACE",
"-jar", "/app/quarkus-run.jar")
.build())
.withFileFromPath("/app", Paths.get(buildPath, "quarkus-app"));

View File

@@ -49,7 +49,7 @@ public class DhfsFusex3IT {
"-Ddhfs.objects.distributed.invalidation.delay=100",
"-Djava.util.concurrent.ForkJoinPool.common.parallelism=4",
"-Ddhfs.objects.ref_verification=true",
"-Dquarkus.log.category.\"com.usatiuk.dhfs\".level=TRACE",
"-Dquarkus.log.category.\\\"com.usatiuk.dhfs\\\".level=TRACE",
"-jar", "/app/quarkus-run.jar")
.build())
.withFileFromPath("/app", Paths.get(buildPath, "quarkus-app"));