gemini-code-assist[bot] commented on code in PR #39018:
URL: https://github.com/apache/beam/pull/39018#discussion_r3436330047
##########
sdks/java/io/rrio/src/main/java/org/apache/beam/io/requestresponse/Call.java:
##########
@@ -535,6 +535,7 @@ public ResponseT call(RequestT request) throws
UserCodeExecutionException {
try {
return future.get(timeout.getMillis(), TimeUnit.MILLISECONDS);
} catch (TimeoutException | InterruptedException e) {
+ future.cancel(true);
Review Comment:

When catching `InterruptedException`, the interrupted status of the thread
is cleared. It is a best practice to restore the interrupted status by calling
`Thread.currentThread().interrupt()` so that upstream callers or the thread
pool runner are aware of the interruption.
```suggestion
future.cancel(true);
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
```
--
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]