ivanzlenko commented on code in PR #7729:
URL: https://github.com/apache/ignite-3/pull/7729#discussion_r2903493422
##########
modules/runner/src/test/java/org/apache/ignite/internal/schema/SchemaSafeTimeTrackerImplTest.java:
##########
@@ -25,27 +25,34 @@
import static org.mockito.Mockito.when;
import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutorService;
import org.apache.ignite.internal.hlc.HybridTimestamp;
import org.apache.ignite.internal.lang.NodeStoppingException;
import org.apache.ignite.internal.manager.ComponentContext;
import org.apache.ignite.internal.metastorage.server.time.ClusterTime;
import org.apache.ignite.internal.testframework.BaseIgniteAbstractTest;
+import org.apache.ignite.internal.testframework.ExecutorServiceExtension;
+import org.apache.ignite.internal.testframework.InjectExecutorService;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
@ExtendWith(MockitoExtension.class)
+@ExtendWith(ExecutorServiceExtension.class)
class SchemaSafeTimeTrackerImplTest extends BaseIgniteAbstractTest {
@Mock
private ClusterTime clusterTime;
+ @InjectExecutorService
Review Comment:
Let's also use 1 thread here to match the implementation value.
##########
modules/runner/src/main/java/org/apache/ignite/internal/schema/SchemaSafeTimeTrackerImpl.java:
##########
@@ -74,16 +78,16 @@ public void onEnqueued(CompletableFuture<Void>
newNotificationFuture, List<Entry
// The update touches the Catalog (i.e. schemas), so we must
chain with the core notification future
// as Catalog listeners will be included in it (because we
need to wait for those listeners to finish execution
// before updating the schema safe time).
- newSchemaSafeTimeUpdateFuture =
schemaSafeTimeUpdateFuture.thenCompose(unused -> newNotificationFuture);
+ newSchemaSafeTimeUpdateFuture =
schemaSafeTimeUpdateFuture.thenComposeAsync(unused -> newNotificationFuture,
watchExecutor);
Review Comment:
What'll happen on node stop?
--
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]