arne-alex commented on code in PR #23333:
URL: https://github.com/apache/beam/pull/23333#discussion_r997817512
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WindmillStateReader.java:
##########
@@ -472,7 +485,13 @@ public void startBatchAndBlock() {
}
Windmill.KeyedGetDataRequest request = createRequest(toFetch);
- Windmill.KeyedGetDataResponse response =
server.getStateData(computation, request);
+ Windmill.KeyedGetDataResponse response;
+ try (AutoCloseable readWrapper =
+ readWrapperSupplier == null ? null : readWrapperSupplier.get()) {
+ response = server.getStateData(computation, request);
+ } catch (Exception e) {
Review Comment:
Done, but I had to wrap the rethrown exception in a RuntimeException.
Otherwise, the compiler complains about declaring checked exceptions. I've
tried to declare them, but gave up after 2-3 hops up the call chain.
--
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]