NSAmelchev commented on code in PR #13710:
URL: https://github.com/apache/ignite/pull/13710#discussion_r4453856607


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java:
##########
@@ -1796,6 +1797,13 @@ private void copyCompressed(SnapshotRestoreContext 
opCtx, int grpId, File from,
         int pageSize = ctx.cache().context().database().pageSize();
 
         try (FileIO src = ioFactory.create(from, READ); FileIO dest = 
ioFactory.create(to, CREATE, WRITE)) {
+            long len = src.size();
+
+            // XFS preallocates blocks on extending writes, and those between 
the pages would stay allocated.

Review Comment:
   Reworded: the file gets its final size first, so the page writes below don’t 
extend it. Otherwise XFS preallocates blocks on extending writes, and those 
between the pages stay allocated (see “speculative preallocation” in the XFS 
FAQ, linked from the comment).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to