Skip to content

Commit 466989d

Browse files
authored
cancel user code with interruption after timeout (#39018)
1 parent c81059f commit 466989d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • sdks/java/io/rrio/src/main/java/org/apache/beam/io/requestresponse

sdks/java/io/rrio/src/main/java/org/apache/beam/io/requestresponse/Call.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ public ResponseT call(RequestT request) throws UserCodeExecutionException {
535535
try {
536536
return future.get(timeout.getMillis(), TimeUnit.MILLISECONDS);
537537
} catch (TimeoutException | InterruptedException e) {
538+
future.cancel(true);
538539
throw new UserCodeTimeoutException(e);
539540
} catch (ExecutionException e) {
540541
parseAndThrow(future, e);

0 commit comments

Comments
 (0)