You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/09/28 05:36:08 UTC
[GitHub] [flink] xintongsong commented on a diff in pull request #20912: [FLINK-29431] Exceptions during job graph serialization lock up client
xintongsong commented on code in PR #20912:
URL: https://github.com/apache/flink/pull/20912#discussion_r981962104
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamConfig.java:
##########
@@ -176,10 +175,18 @@ public CompletableFuture<StreamConfig> triggerSerializationAndReturnFuture(
Function.identity())),
this.config,
CHAINED_TASK_CONFIG);
- } catch (IOException e) {
- throw new StreamTaskException(
- "Could not serialize object for key chained task config.",
- e);
+ } catch (IOException | StreamTaskException e) {
+ StreamTaskException serializationException;
+ if (e instanceof IOException) {
+ serializationException =
+ new StreamTaskException(
+ "Could not serialize object for key chained task config.",
+ e);
+ } else {
+ serializationException = (StreamTaskException) e;
+ }
+ serializationFuture.completeExceptionally(serializationException);
+ throw serializationException;
Review Comment:
There's no point of throwing an exception in this thread. I think we can simply catch any throwable and complete the future with them.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org