ptupitsyn commented on code in PR #6556:
URL: https://github.com/apache/ignite-3/pull/6556#discussion_r2325227039


##########
modules/code-deployment/src/main/java/org/apache/ignite/internal/deployunit/DeploymentManagerImpl.java:
##########
@@ -411,14 +411,14 @@ public CompletableFuture<Version> 
detectLatestDeployedVersion(String id) {
 
     @Override
     public CompletableFuture<Void> startAsync(ComponentContext 
componentContext) {
-        
deployer.initUnitsFolder(workDir.resolve(configuration.location().value()));
+        Path deploymentUnitFolder = 
workDir.resolve(configuration.location().value());
+        deployer.initUnitsFolder(deploymentUnitFolder);
         
deploymentUnitStore.registerNodeStatusListener(nodeStatusWatchListener);
         
deploymentUnitStore.registerClusterStatusListener(clusterStatusWatchListener);
         messaging.subscribe();
         failover.registerTopologyChangeCallback(nodeStatusCallback, 
clusterEventCallback);
         undeployer.start(UNDEPLOYER_DELAY.getSeconds(), TimeUnit.SECONDS);
-
-        return nullCompletedFuture();
+        return new StaticDeploymentUnitObserver(deploymentUnitStore, nodeName, 
deploymentUnitFolder).observeAndRegisterStaticUnits();

Review Comment:
   It is a one-time scan, right? We don't watch the directory for new units 
continuously? 



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