gong commented on code in PR #6726:
URL: https://github.com/apache/inlong/pull/6726#discussion_r1040356945
##########
inlong-sort/sort-connectors/filesystem/src/main/java/org/apache/inlong/sort/filesystem/stream/AbstractStreamingWriter.java:
##########
@@ -129,7 +136,20 @@ public void open() throws Exception {
* Commit up to this checkpoint id.
*/
protected void commitUpToCheckpoint(long checkpointId) throws Exception {
- helper.commitUpToCheckpoint(checkpointId);
+ try {
+ helper.commitUpToCheckpoint(checkpointId);
+ if (sinkMetricData != null) {
+ sinkMetricData.invoke(rowSize, dataSize);
+ }
+ } catch (Exception e) {
Review Comment:
> It is recommended to throw an exception first to ensure that data is not
lost.
@yunqingmoswu dirty data metric can be reportered if throw exception
--
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]