You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "schnappi17 (via GitHub)" <gi...@apache.org> on 2023/08/08 06:06:18 UTC

[GitHub] [incubator-paimon] schnappi17 commented on a diff in pull request #1735: [flink] Support source currentFetchEventTimeLag metric

schnappi17 commented on code in PR #1735:
URL: https://github.com/apache/incubator-paimon/pull/1735#discussion_r1286633947


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/FileStoreSourceSplitReader.java:
##########
@@ -121,6 +129,13 @@ public void handleSplitsChanges(SplitsChange<FileStoreSourceSplit> splitsChange)
         }
 
         splits.addAll(splitsChange.splits());
+        DataSplit dataSplit = (DataSplit) splits.peek().split();
+        if (sourceReaderMetrics != null
+                && (currentSnapshotId == FileStoreSourceReaderMetrics.UNDEFINED
+                        || dataSplit.snapshotId() != currentSnapshotId)) {
+            currentSnapshotId = dataSplit.snapshotId();

Review Comment:
   Yes, there is no need to check if snapshot changes.



-- 
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@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org