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
This commit is contained in:
parent
8145845fca
commit
028e792e1d
|
@ -45,7 +45,6 @@ import org.elasticsearch.index.IndexNotFoundException;
|
|||
import org.elasticsearch.index.engine.CommitStats;
|
||||
import org.elasticsearch.index.engine.Engine;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseActions;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseAlreadyExistsException;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseNotFoundException;
|
||||
import org.elasticsearch.index.seqno.SeqNoStats;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
|
@ -440,7 +439,6 @@ public class ShardFollowTasksExecutor extends PersistentTasksExecutor<ShardFollo
|
|||
* going on. Log it, and renew again after another renew interval has passed.
|
||||
*/
|
||||
final Throwable innerCause = ExceptionsHelper.unwrapCause(inner);
|
||||
assert innerCause instanceof RetentionLeaseAlreadyExistsException == false;
|
||||
logRetentionLeaseFailure(retentionLeaseId, innerCause);
|
||||
}));
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue