This is an automated email from the ASF dual-hosted git repository.

mpochatkin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new a4327f8fd31 IGNITE-26865 Fix cached deployment unit close (#7013)
a4327f8fd31 is described below

commit a4327f8fd316405cf50d0cdbdef95b706839708c
Author: Mikhail <[email protected]>
AuthorDate: Fri Dec 5 17:52:20 2025 +0300

    IGNITE-26865 Fix cached deployment unit close (#7013)
---
 .../ignite/internal/deployunit/CachedDeploymentUnit.java     | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git 
a/modules/code-deployment/src/main/java/org/apache/ignite/internal/deployunit/CachedDeploymentUnit.java
 
b/modules/code-deployment/src/main/java/org/apache/ignite/internal/deployunit/CachedDeploymentUnit.java
index e07d2a7529a..eb0472a47f7 100644
--- 
a/modules/code-deployment/src/main/java/org/apache/ignite/internal/deployunit/CachedDeploymentUnit.java
+++ 
b/modules/code-deployment/src/main/java/org/apache/ignite/internal/deployunit/CachedDeploymentUnit.java
@@ -41,10 +41,14 @@ public class CachedDeploymentUnit implements DeploymentUnit 
{
     @Override
     public void close() throws Exception {
         future.whenComplete((unit, throwable) -> {
-            try {
-                unit.close();
-            } catch (Exception e) {
-                LOG.warn("Failed to close deployment unit: {}", e, unit);
+            if (throwable != null) {
+                LOG.info("Future to access cached unit is failed.", throwable);
+            } else {
+                try {
+                    unit.close();
+                } catch (Exception e) {
+                    LOG.warn("Failed to close deployment unit: {}", e, unit);
+                }
             }
         });
     }

Reply via email to