This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 14ceb4d0ee [flink] fix that lookup table loading is not timely. (#5879)
14ceb4d0ee is described below
commit 14ceb4d0eeecbbb249789802ca5f901325c14647
Author: zhoulii <[email protected]>
AuthorDate: Mon Jul 14 11:41:12 2025 +0800
[flink] fix that lookup table loading is not timely. (#5879)
---
.../org/apache/paimon/flink/lookup/FullCacheLookupTable.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/FullCacheLookupTable.java
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/FullCacheLookupTable.java
index 27795a00ff..b680bb402d 100644
---
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/FullCacheLookupTable.java
+++
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/FullCacheLookupTable.java
@@ -265,11 +265,20 @@ public abstract class FullCacheLookupTable implements
LookupTable {
}
private void doRefresh() throws Exception {
+ Long latestSnapshotId =
context.table.snapshotManager().latestSnapshotId();
+ if (latestSnapshotId == null) {
+ return;
+ }
+
while (true) {
try (RecordReaderIterator<InternalRow> batch =
new RecordReaderIterator<>(reader.nextBatch(false))) {
if (!batch.hasNext()) {
- return;
+ if (reader.nextSnapshotId() > latestSnapshotId) {
+ return;
+ } else {
+ continue;
+ }
}
refresh(batch);
}