You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/08/05 11:05:08 UTC

[GitHub] [ignite] xtern opened a new pull request, #10183: IGNITE-17456 Duplicate WAL compaction notifications in log.

xtern opened a new pull request, #10183:
URL: https://github.com/apache/ignite/pull/10183

   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite] xtern merged pull request #10183: IGNITE-17456 Fixed initialization of already compressed segments.

Posted by GitBox <gi...@apache.org>.
xtern merged PR #10183:
URL: https://github.com/apache/ignite/pull/10183


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite] ivandasch commented on a diff in pull request #10183: IGNITE-17456 Duplicate WAL compaction notifications in log.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on code in PR #10183:
URL: https://github.com/apache/ignite/pull/10183#discussion_r941189320


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -2185,6 +2185,13 @@ private void initAlreadyCompressedSegments() {
 
             if (alreadyCompressed.length > 0)
                 segmentAware.onSegmentCompressed(alreadyCompressed[alreadyCompressed.length - 1].idx());
+            else {
+                // We have to set a starting index for the compressor.
+                FileDescriptor[] alreadyArchived = scan(walArchiveDir.listFiles(WAL_SEGMENT_FILE_FILTER));

Review Comment:
   If wal history is quite big and there are many archived files the scan can be quite slow



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite] ivandasch commented on a diff in pull request #10183: IGNITE-17456 Duplicate WAL compaction notifications in log.

Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite] ivandasch commented on a diff in pull request #10183: IGNITE-17456 Duplicate WAL compaction notifications in log.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on code in PR #10183:
URL: https://github.com/apache/ignite/pull/10183#discussion_r945536401


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCompressStorage.java:
##########
@@ -69,9 +69,6 @@ class SegmentCompressStorage {
      * @param compressedIdx Index of compressed segment.
      */
     synchronized void onSegmentCompressed(long compressedIdx) {
-        if (log.isInfoEnabled())

Review Comment:
   Let's leave it but only with a changed log level, TRACE or DEBUG



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite] ivandasch commented on a diff in pull request #10183: IGNITE-17456 Duplicate WAL compaction notifications in log.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on code in PR #10183:
URL: https://github.com/apache/ignite/pull/10183#discussion_r945552452


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -2266,6 +2284,9 @@ private long tryReserveNextSegmentOrWait() throws IgniteInterruptedCheckedExcept
             if (reserved)
                 return segmentToCompress;
             else {
+                if (log.isInfoEnabled())

Review Comment:
   Is the usage of INFO really required here?



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite] ivandasch commented on a diff in pull request #10183: IGNITE-17456 Duplicate WAL compaction notifications in log.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on code in PR #10183:
URL: https://github.com/apache/ignite/pull/10183#discussion_r941187249


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCompressStorage.java:
##########
@@ -69,9 +69,6 @@ class SegmentCompressStorage {
      * @param compressedIdx Index of compressed segment.
      */
     synchronized void onSegmentCompressed(long compressedIdx) {
-        if (log.isInfoEnabled())

Review Comment:
   Let's just change a logging level (debug), removing is not necessary 



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org