From: Antti Villberg Date: Thu, 13 Dec 2018 10:34:03 +0000 (+0200) Subject: Truncate big value cluster file if its size decreases X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=37bada9080ec18ae978d5983035e57199e0d9c78;p=simantics%2Fplatform.git Truncate big value cluster file if its size decreases gitlab #232 Change-Id: I62617e6857a150cb27d0d81a53da604577173bfe --- diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterChange.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterChange.java index 880bfd00d..0b1763134 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterChange.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterChange.java @@ -493,6 +493,8 @@ public final class ClusterChange { left -= written; checkBufferSpace(12); } + // Possibly truncate file + modiValue(ri, length_, new byte[0], 0, 0); return sum; }