You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/12/10 09:15:04 UTC

[GitHub] [ignite] AMashenkov commented on a change in pull request #8554: IGNITE-13101 Fixed uncompleted futures leak on node stop in distributed metastorage.

AMashenkov commented on a change in pull request #8554:
URL: https://github.com/apache/ignite/pull/8554#discussion_r539999404



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DistributedMetaStorageImpl.java
##########
@@ -1119,7 +1199,16 @@ private void onAckMessage(
         ClusterNode node,
         DistributedMetaStorageUpdateAckMessage msg
     ) {
-        GridFutureAdapter<Boolean> fut = updateFuts.remove(msg.requestId());
+        GridFutureAdapter<Boolean> fut;
+
+        updateFutsStopLock.readLock().lock();
+
+        try {
+            fut = updateFuts.remove(msg.requestId());
+        }
+        finally {
+            updateFutsStopLock.readLock().unlock();

Review comment:
       Readlock looks useless here.
   Anyway, you'll finish the future in few lines below.




----------------------------------------------------------------
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:
users@infra.apache.org