tkalkirill commented on code in PR #4663:
URL: https://github.com/apache/ignite-3/pull/4663#discussion_r1824514032


##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageCompactionTrigger.java:
##########
@@ -319,4 +322,33 @@ private void cancelLastScheduledFutureBusy() {
             lock.unlock();
         }
     }
+
+    private void startCompactionOnRecoveryAsync() {
+        assert metaStorageManager.recoveryFinishedFuture().isDone();
+
+        long latestCompactionRevisionLocally = 
metaStorageManager.getCompactionRevisionLocally();
+
+        if (latestCompactionRevisionLocally != -1) {
+            runAsync(() -> inBusyLockSafe(busyLock, () -> 
storage.compact(latestCompactionRevisionLocally)), compactionExecutor)

Review Comment:
   There is nothing wrong with changing to a pool with several threads.
   
   The new compaction will first update the compaction revision in memory and 
then begin its execution. Two compactions will not interfere with each other 
since they write in batches on which we take a lock for recording.



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to