tkalkirill commented on code in PR #4602: URL: https://github.com/apache/ignite-3/pull/4602#discussion_r1808514028
########## modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/AbstractKeyValueStorage.java: ########## @@ -196,6 +223,41 @@ public long getCompactionRevision() { } } + @Override + public void startCompaction(long revision) { + assert revision >= 0 : revision; + + rwLock.writeLock().lock(); + + try { + assertCompactionRevisionLessThanCurrent(revision, rev); + + if (isRecoveryState()) { + compactionRevision = revision; + } else { + watchProcessor + .addTaskToWatchEventQueue(() -> setCompactionRevision(revision)) + .thenComposeAsync(unused -> readOperationsFuture(revision), compactionExecutor) + .thenRunAsync(() -> compact(revision), compactionExecutor) + .whenComplete((unused, throwable) -> { + if (throwable == null) { + log.info("Metastore compaction completed successfully: [compactionRevision={}]", revision); + } else { + log.error( + "Metastore compaction completed unsuccessfully: [compactionRevision={}]", Review Comment: Why not. -- 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