We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ade15f commit 55d0395Copy full SHA for 55d0395
paimon-core/src/main/java/org/apache/paimon/table/ExpireSnapshotsImpl.java
@@ -115,7 +115,12 @@ public int expire() {
115
116
// protected by 'snapshot.expire.limit'
117
// (the maximum number of snapshots allowed to expire at a time)
118
- maxExclusive = Math.min(maxExclusive, earliest + maxDeletes);
+ long maxExclusiveByExpireLimit = earliest + maxDeletes;
119
+ while (!snapshotManager.snapshotExists(maxExclusiveByExpireLimit)) {
120
+ // Ensure maxExclusive exist, deal some snapshot between earliest and latest is deleted
121
+ maxExclusiveByExpireLimit++;
122
+ }
123
+ maxExclusive = Math.min(maxExclusive, maxExclusiveByExpireLimit);
124
125
for (long id = min; id < maxExclusive; id++) {
126
// Early exit the loop for 'snapshot.time-retained'
0 commit comments