From fdf0dbac10faf2b717cc0f7a7bd9462b371e208a Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Thu, 13 Dec 2018 12:34:03 +0200 Subject: [PATCH] Truncate big value cluster file if its size decreases gitlab #232 Change-Id: I62617e6857a150cb27d0d81a53da604577173bfe --- .../src/fi/vtt/simantics/procore/internal/ClusterChange.java | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.47.1