Standing-Man commented on code in PR #3657:
URL: https://github.com/apache/iggy/pull/3657#discussion_r3638425778
##########
foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySinkWriter.java:
##########
@@ -180,9 +179,25 @@ public void flush(boolean endOfInput) throws IOException {
@Override
public void close() throws Exception {
- // Flush any remaining buffered records
- flush(true);
- // Note: HTTP client doesn't have close() method - connections managed
by Java HttpClient pool
+ IOException flushException = null;
+ try {
+ flush(true);
+ } catch (IOException e) {
+ flushException = e;
+ }
Review Comment:
Good catch, Catching `Exception` would violate the repository’s Checkstyle
rules, which prohibit catching overly broad exception types. Therefore, this
change catches only two exception types: `IOException` and `RuntimeException`.
* `IOException` is the checked exception declared by `flush()`.
* `RuntimeException` covers both `ConnectorException` and runtime failures
from the TCP client.
--
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]