Skip to content

Commit f800a47

Browse files
committed
[FLINK-36406]: Log exceptions in SchemaRegistryRequestHandler#close()
1 parent 6111897 commit f800a47

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/schema/coordinator/SchemaRegistryRequestHandler.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import org.slf4j.LoggerFactory;
4646

4747
import java.io.Closeable;
48-
import java.io.IOException;
4948
import java.util.ArrayList;
5049
import java.util.Collections;
5150
import java.util.HashMap;
@@ -343,16 +342,21 @@ public void getSchemaChangeResult(CompletableFuture<CoordinationResponse> respon
343342
}
344343
}
345344

345+
/**
346+
* As at Flink 1.20, the runtime (<code>
347+
* DefaultOperatorCoordinatorHandler#disposeAllOperatorCoordinators</code>) will ignore the
348+
* exception thrown by this method. Thus, it should report errors by logging them.
349+
*/
346350
@Override
347-
public void close() throws IOException {
351+
public void close() {
348352
if (schemaChangeThreadPool != null) {
349353
schemaChangeThreadPool.shutdown();
350354
}
351355

352356
try {
353357
metadataApplier.close();
354358
} catch (Exception e) {
355-
throw new IOException("Failed to close metadata applier.", e);
359+
LOG.error("Failed to close metadata applier.", e);
356360
}
357361
}
358362

0 commit comments

Comments
 (0)