pvary commented on code in PR #18717:
URL: https://github.com/apache/iceberg/pull/18717#discussion_r4482277178
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertPlanner.java:
##########
@@ -350,14 +351,17 @@ private void ensureIndexCurrent(Snapshot mainSnapshot) {
return;
}
- if (!indexReflects(mainSnapshot)) {
+ List<Snapshot> externalCommits = externalCommitsSinceIndex(mainSnapshot);
+ if (externalCommits == null || deltaReadsMoreThanRebuild(mainSnapshot,
externalCommits)) {
boolean bootstrap = indexSnapshotId == null;
LOG.info(
"{} worker index from main snapshot {} for field IDs {}.",
bootstrap ? "Bootstrapping" : "Reindexing",
mainSnapshot.snapshotId(),
eqFieldIds);
rebuildIndex(mainSnapshot, !bootstrap);
+ } else {
+ emitIncrementalReindex(mainSnapshot, externalCommits);
Review Comment:
`TestEqualityConvertPlanner.repeatsDeltaThatFailed` shows that the delta is
repeated, not the full reindex. Only `externalFile` is emitted, not the whole
table.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]