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 2022/08/11 14:11:33 UTC

[GitHub] [ignite-3] alievmirza commented on a diff in pull request #977: IGNITE-17286 Add missed busy locks to get rid of resources leaking during table creation

alievmirza commented on code in PR #977:
URL: https://github.com/apache/ignite-3/pull/977#discussion_r943534021


##########
modules/schema/src/main/java/org/apache/ignite/internal/schema/SchemaManager.java:
##########
@@ -336,11 +345,20 @@ private SchemaDescriptor getSchemaDescriptorLocally(int schemaVer, ExtendedTable
      */
     public CompletableFuture<SchemaRegistry> schemaRegistry(long causalityToken, @Nullable UUID tableId) {
         if (!busyLock.enterBusy()) {
-            throw new IgniteException(new NodeStoppingException());
+            throw new IgniteException(NODE_STOPPING_ERR, new NodeStoppingException());
         }
 
         try {
-            return registriesVv.get(causalityToken).thenApply(regs -> tableId == null ? null : regs.get(tableId));
+            return registriesVv.get(causalityToken).thenApply(regs -> {
+                if (!busyLock.enterBusy()) {
+                    throw new IgniteException(NODE_STOPPING_ERR, new NodeStoppingException());
+                }
+                try {
+                    return tableId == null ? null : regs.get(tableId);

Review Comment:
   I think it's out of the context of this task



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org