IGNITE-8706 Fixed total allocated pages count after file truncation
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java
index ae4880d..852eb0d 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java
@@ -279,9 +279,9 @@
             throw new PersistentStorageIOException("Failed to delete partition file: " + cfgFile.getPath(), e);
         }
         finally {
-            allocated.set(0);
+            allocatedTracker.updateTotalAllocatedPages(-1L * pages());
 
-            allocatedTracker.updateTotalAllocatedPages(-1L * this.pages());
+            allocated.set(0);
 
             inited = false;