-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't fail retention lease sync actions due to capacity constraints #109414
base: main
Are you sure you want to change the base?
Don't fail retention lease sync actions due to capacity constraints #109414
Conversation
ccb95e9
to
795287b
Compare
...r/src/main/java/org/elasticsearch/action/support/replication/TransportReplicationAction.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/elasticsearch/action/support/replication/TransportReplicationAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/support/replication/TransportWriteAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/common/util/ArrayUtils.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/common/util/ArrayUtils.java
Outdated
Show resolved
Hide resolved
…p_circuit_breakers_retention_lease_sync
Hi @nicktindall, I've created a changelog YAML for you. |
Pinging @elastic/es-distributed (Team:Distributed) |
...r/src/main/java/org/elasticsearch/action/support/replication/TransportReplicationAction.java
Outdated
Show resolved
Hide resolved
…ntion_lease_sync # Conflicts: # server/src/main/java/org/elasticsearch/index/seqno/RetentionLeaseBackgroundSyncAction.java # server/src/main/java/org/elasticsearch/index/seqno/RetentionLeaseSyncAction.java
@@ -91,10 +91,10 @@ public RetentionLeaseSyncAction( | |||
RetentionLeaseSyncAction.Request::new, | |||
RetentionLeaseSyncAction.Request::new, | |||
new ManagementOnlyExecutorFunction(threadPool), | |||
PrimaryActionExecution.RejectOnOverload, | |||
PrimaryActionExecution.Force, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this change is necessary on the RetentionLeaseBackgroundSyncAction
because it's not a TransportWriteAction
, and therefore checkPrimaryLimits
(where the indexing pressure check is done) is a no-op.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we even need to make any changes to RetentionLeaseBackgroundSyncAction
. It doesn't appear that its failure will have the same consequences as that of RetentionLeaseSyncAction
.
…p_circuit_breakers_retention_lease_sync
Closes #105926
RetentionLeaseSyncAction
replicates the retention leases from the primary node to the replicas and persists them to disk on both the primary and replicas.RetentionLeaseSyncAction
is aTransportWriteAction
. ATransportWriteAction
executes an update on the primary copy of the shard then on the replica(s). If the primary operation succeeds, but the replica operation(s) do not, the shard is marked as failed and an expensive recovery process is kicked off.One of the reasons a
TransportAction
can fail is due to the circuit breakers residing on each node. If a request comes in and the node is very busy it can fail an action to prevent running out of memory.Because the
RetentionLeaseSyncAction
consumes a negligible amount of memory, this PR excludes the replica component of theRetentionLeaseSyncAction
andBackgroundRetentionLeaseSyncAction
from the circuit breaker checks. This will prevent a costly failure without significantly increasing the risk of out-of-memory errors.Edit: It has also become apparent that the indexing pressure check can fail the retention lease sync. I've included an additional change in this PR to force execution of the action on the primary to bypass such checks. Indexing pressure checks are already bypassed on the replica by default in
TransportReplicationAction