Skip to content

Commit

Permalink
[FLINK-36406]: Log exceptions in SchemaRegistryRequestHandler#close()
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Sep 30, 2024
1 parent 6111897 commit f800a47
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import org.slf4j.LoggerFactory;

import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -343,16 +342,21 @@ public void getSchemaChangeResult(CompletableFuture<CoordinationResponse> respon
}
}

/**
* As at Flink 1.20, the runtime (<code>
* DefaultOperatorCoordinatorHandler#disposeAllOperatorCoordinators</code>) will ignore the
* exception thrown by this method. Thus, it should report errors by logging them.
*/
@Override
public void close() throws IOException {
public void close() {
if (schemaChangeThreadPool != null) {
schemaChangeThreadPool.shutdown();
}

try {
metadataApplier.close();
} catch (Exception e) {
throw new IOException("Failed to close metadata applier.", e);
LOG.error("Failed to close metadata applier.", e);
}
}

Expand Down

0 comments on commit f800a47

Please sign in to comment.