You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/01/27 23:26:16 UTC

[GitHub] [pulsar] pkumar-singh commented on a change in pull request #9348: Make admin operations on Statestore non blocking

pkumar-singh commented on a change in pull request #9348:
URL: https://github.com/apache/pulsar/pull/9348#discussion_r565708344



##########
File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
##########
@@ -362,19 +382,8 @@ public void deregisterFunction(final String tenant,
             log.error("{}/{}/{} Failed to authorize [{}]", tenant, namespace, componentName, e);
             throw new RestException(Status.INTERNAL_SERVER_ERROR, e.getMessage());
         }
-        // delete state table
-        if (null != worker().getStateStoreAdminClient()) {
-            final String tableNs = getStateNamespace(tenant, namespace);
-            final String tableName = componentName;
-            try {
-                FutureUtils.result(worker().getStateStoreAdminClient().deleteStream(tableNs, tableName));
-            } catch (NamespaceNotFoundException | StreamNotFoundException e) {
-                // ignored if the state table doesn't exist
-            } catch (Exception e) {
-                log.error("{}/{}/{} Failed to delete state table: {}", tenant, namespace, componentName, e.getMessage());
-                throw new RestException(Status.INTERNAL_SERVER_ERROR, e.getMessage());
-            }
-        }
+
+        deleteStatestoreTableAsync(getStateNamespace(tenant, namespace), componentName);

Review comment:
       Yeah. Done.




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