codelipenghui commented on a change in pull request #13596:
URL: https://github.com/apache/pulsar/pull/13596#discussion_r782771994
##########
File path:
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java
##########
@@ -186,6 +188,12 @@ protected void batchOperation(List<MetadataOp> ops) {
}
}
}, null);
+
+ executor.schedule(() -> {
+ if (!callback.get()) {
+ ops.forEach(n -> n.getFuture().completeExceptionally(new
TimeoutException()));
+ }
+ }, getMetadataStoreConfig().getOperationTimeoutSeconds(),
TimeUnit.SECONDS);
Review comment:
I think we don't need to change here? The batch operation just groups a
few ops to one batch, each single ops has a future and if the caller requires
an operation timeout, the caller can only use `future.get(timeout)`?
--
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]