This is an automated email from the ASF dual-hosted git repository.
JingsongLi 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 5b39ec21f0 [core] Drop concurrently-built global indexes at
materialize-deletion compaction (#8947)
5b39ec21f0 is described below
commit 5b39ec21f0912e27d3d1564e92f9be8cf3851d26
Author: XiaoHongbo <[email protected]>
AuthorDate: Fri Jul 31 10:13:32 2026 +0800
[core] Drop concurrently-built global indexes at materialize-deletion
compaction (#8947)
---
.../dataevolution/DataEvolutionCompactGlobalIndexDropper.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
a/paimon-core/src/main/java/org/apache/paimon/append/dataevolution/DataEvolutionCompactGlobalIndexDropper.java
b/paimon-core/src/main/java/org/apache/paimon/append/dataevolution/DataEvolutionCompactGlobalIndexDropper.java
index 35432f085d..810398454d 100644
---
a/paimon-core/src/main/java/org/apache/paimon/append/dataevolution/DataEvolutionCompactGlobalIndexDropper.java
+++
b/paimon-core/src/main/java/org/apache/paimon/append/dataevolution/DataEvolutionCompactGlobalIndexDropper.java
@@ -59,12 +59,20 @@ class DataEvolutionCompactGlobalIndexDropper {
return Collections.emptyList();
}
+ // Scan at the latest snapshot, not the compaction's base: a global
index
+ // built concurrently and committed after this compaction planned still
+ // references pre-materialization row-ids and must be dropped too.
+ Snapshot scanSnapshot = table.snapshotManager().latestSnapshot();
+ if (scanSnapshot == null) {
+ scanSnapshot = snapshot;
+ }
+
Map<Pair<BinaryRow, Integer>, List<IndexFileMeta>> deletedIndexes =
new LinkedHashMap<>();
for (IndexManifestEntry entry :
table.store()
.newIndexFileHandler()
.scan(
- snapshot,
+ scanSnapshot,
e ->
partitions.contains(e.partition())
&&
e.indexFile().globalIndexMeta() != null)) {