pvillard31 commented on code in PR #11570:
URL: https://github.com/apache/nifi/pull/11570#discussion_r4147066345


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/ClusterReplicationComponentLifecycle.java:
##########
@@ -680,6 +739,183 @@ private boolean waitForControllerServiceValidation(final 
NiFiUser user, final UR
         return false;
     }
 
+    private ListingRequestResult createFlowFileListingRequest(final NiFiUser 
user, final URI originalUri, final String connectionId,
+                                                              final 
Set<NodeIdentifier> expectedNodes) throws LifecycleManagementException {
+        final URI createListingRequestUri;
+        try {
+            createListingRequestUri = new URI(originalUri.getScheme(), 
originalUri.getUserInfo(), originalUri.getHost(), originalUri.getPort(),
+                "/nifi-api/flowfile-queues/" + connectionId + 
"/listing-requests", null, originalUri.getFragment());
+        } catch (final URISyntaxException e) {
+            throw new RuntimeException(e);
+        }
+
+        try {
+            final AsyncClusterResponse clusterResponse = 
replicateFlowFileListingRequest(expectedNodes, user, HttpMethod.POST, 
createListingRequestUri);
+

Review Comment:
   Agreed. The cluster queue read now waits in bounded slices using the 
remaining drain deadline and checks cancellation between slices. The same 
deadline starts before preflight, so preflight, producer stop, and queue wait 
share the 30-second budget.



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