stankiewicz commented on code in PR #37164:
URL: https://github.com/apache/beam/pull/37164#discussion_r2682834290
##########
sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/read/UnboundedSolaceReader.java:
##########
@@ -150,9 +157,32 @@ public boolean advance() {
@Override
public void close() {
+ try {
+ if (nackCallback != null) {
+ // wait only for last one to finish, it will mean all the previous one
are also done.
+ nackCallback.get(ackDeadlineSeconds * 2, TimeUnit.SECONDS);
+ }
+ } catch (InterruptedException | ExecutionException | TimeoutException e) {
+ LOG.error("SolaceIO.Read: Failed to wait till nack background thread is
finished");
+ }
Review Comment:
refactored it so nack is running on seperate pool and we can await to finish
all futures.
--
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]