Skip to content

Commit 947f8fc

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 9545c94 commit 947f8fc

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
@@ -42,7 +42,6 @@
4242
import org.elasticsearch.index.engine.CommitStats;
4343
import org.elasticsearch.index.engine.Engine;
4444
import org.elasticsearch.index.seqno.RetentionLeaseActions;
45-
import org.elasticsearch.index.seqno.RetentionLeaseAlreadyExistsException;
4645
import org.elasticsearch.index.seqno.RetentionLeaseNotFoundException;
4746
import org.elasticsearch.index.seqno.SeqNoStats;
4847
import org.elasticsearch.index.shard.ShardId;
@@ -325,7 +324,6 @@ protected Scheduler.Cancellable scheduleBackgroundRetentionLeaseRenewal(final Lo
325324
* going on. Log it, and renew again after another renew interval has passed.
326325
*/
327326
final Throwable innerCause = ExceptionsHelper.unwrapCause(inner);
328-
assert innerCause instanceof RetentionLeaseAlreadyExistsException == false;
329327
logRetentionLeaseFailure(retentionLeaseId, innerCause);
330328
}));
331329
} else {

0 commit comments

Comments
 (0)