nizhikov commented on code in PR #10292:
URL: https://github.com/apache/ignite/pull/10292#discussion_r1005590824


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCompressStorage.java:
##########
@@ -79,10 +79,31 @@ synchronized void onSegmentCompressed(long compressedIdx) {
         else
             this.lastCompressedIdx = lastMaxCompressedIdx;
 
+        notifyAll();
+
         if (compressedIdx > lastEnqueuedToCompressIdx)
             lastEnqueuedToCompressIdx = compressedIdx;
     }
 
+    /**
+     * Method will wait activation of particular WAL segment index.
+     *
+     * @param awaitIdx absolute index {@link #lastCompressedIdx()}} to become 
true.
+     * @throws IgniteInterruptedCheckedException if interrupted.
+     */
+    public synchronized void awaitSegmentCompressed(long awaitIdx) throws 
IgniteInterruptedCheckedException {
+        while (lastCompressedIdx() < awaitIdx && !interrupted) {
+            try {
+                wait(2000);

Review Comment:
   > I suppose at least we must create a ticket for that. WDYT?
   
   https://issues.apache.org/jira/browse/IGNITE-17978



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