xtern commented on a change in pull request #9047: URL: https://github.com/apache/ignite/pull/9047#discussion_r622368937
########## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DmsDataWriterWorker.java ########## @@ -81,134 +90,125 @@ public DmsDataWriterWorker( super(igniteInstanceName, "dms-writer", log); this.lock = lock; this.errorHnd = errorHnd; + + pauseTask = new FutureTask<>(() -> AWAIT); + // Completed future task. + pauseTask.run(); Review comment: Instead of doing .run() we can define pauseTask as ``` private volatile Future<?> pauseTask = CompletableFuture.completedFuture(AWAIT); ``` and cast it in ``pause`` method to ``RunnableFuture`` like this ``` updateQueue.offer((RunnableFuture<?>)(pauseTask = new FutureTask<>(() -> AWAIT))); ``` -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org