Skip to content

Commit d1a69cd

Browse files
committed
Remove already exist assertion while renew ccr lease (#46009)
If a CCR lease is disappeared while we are renewing it, then we will issue asyncAddRetentionLease to add that lease. And if asyncAddRetentionLease takes longer than retentionLeaseRenewInterval, then we can issue another asyncAddRetentionLease request. One of asyncAddRetentionLease requests will fail with RetentionLeaseAlreadyExistsException, hence trip the assertion. Closes #45192
1 parent 271c864 commit d1a69cd

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTasksExecutor.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import org.elasticsearch.index.engine.CommitStats;
4646
import org.elasticsearch.index.engine.Engine;
4747
import org.elasticsearch.index.seqno.RetentionLeaseActions;
48-
import org.elasticsearch.index.seqno.RetentionLeaseAlreadyExistsException;
4948
import org.elasticsearch.index.seqno.RetentionLeaseNotFoundException;
5049
import org.elasticsearch.index.seqno.SeqNoStats;
5150
import org.elasticsearch.index.shard.ShardId;
@@ -440,7 +439,6 @@ protected Scheduler.Cancellable scheduleBackgroundRetentionLeaseRenewal(final Lo
440439
* going on. Log it, and renew again after another renew interval has passed.
441440
*/
442441
final Throwable innerCause = ExceptionsHelper.unwrapCause(inner);
443-
assert innerCause instanceof RetentionLeaseAlreadyExistsException == false;
444442
logRetentionLeaseFailure(retentionLeaseId, innerCause);
445443
}));
446444
} else {

0 commit comments

Comments
 (0)