ivandasch commented on code in PR #10183:
URL: https://github.com/apache/ignite/pull/10183#discussion_r945549893


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -2181,13 +2181,31 @@ private void init() {
          * Checks if there are already compressed segments and assigns 
counters if needed.
          */
         private void initAlreadyCompressedSegments() {
-            FileDescriptor[] alreadyCompressed = 
scan(walArchiveDir.listFiles(WAL_SEGMENT_FILE_COMPACTED_FILTER));
+            long firstArchivedIdx = -1;
+            long lastCompactedIdx = -1;
 
-            if (alreadyCompressed.length > 0)
-                
segmentAware.onSegmentCompressed(alreadyCompressed[alreadyCompressed.length - 
1].idx());
+            for (File file : walArchiveDir.listFiles()) {

Review Comment:
   Sorting of segments is quite important. You should use here scan and iterate 
over an array of FileDescriptor



-- 
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