Eagerly release resources in TransportAwaitClusterStateVersionAppliedAction#143477
Merged
DaveCTurner merged 3 commits intoelastic:mainfrom Mar 3, 2026
Conversation
…dAction` Today `TransportAwaitClusterStateVersionAppliedAction` remains subscribed to the `ClusterApplierService` after cancellation, and this subscription retains a reference to its inner listener even when complete. This commit moves to using a `SubscribableListener`, avoiding retaining the inner listener after completion, and subscribes directly to the `ClusterApplierService` so that it can unsubscribe promptly on cancellation.
Collaborator
|
Pinging @elastic/es-distributed (Team:Distributed) |
DaveCTurner
commented
Mar 3, 2026
Comment on lines
+171
to
+172
| r -> onceListener.addListener(ActionListener.running(r)), | ||
| onceListener |
Member
Author
There was a problem hiding this comment.
May seem a bit odd to pass in onceListener and a lambda that binds onceListener separately here - I have a potential change incoming that will pass in different listeners here hence the distinction. But we can just use onceListener if you'd prefer and I'll separate them later.
…AppliedAction-cancellation
GalLalouche
pushed a commit
to GalLalouche/elasticsearch
that referenced
this pull request
Mar 3, 2026
…dAction` (elastic#143477) Today `TransportAwaitClusterStateVersionAppliedAction` remains subscribed to the `ClusterApplierService` after cancellation, and this subscription retains a reference to its inner listener even when complete. This commit moves to using a `SubscribableListener`, avoiding retaining the inner listener after completion, and subscribes directly to the `ClusterApplierService` so that it can unsubscribe promptly on cancellation.
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Mar 3, 2026
…locations * upstream/main: (51 commits) ESQL: Remaining serialization tests (elastic#143470) Eagerly release resources in `TransportAwaitClusterStateVersionAppliedAction` (elastic#143477) Stop and relocate sliced reindex on shutdown (elastic#143183) Documentation for query_vector base64 parameter (elastic#142675) ES|QL: Fix LIMIT after all columns are dropped (elastic#143463) Update docs-build.yml (elastic#142958) Fix KnnIndexTester to work with byte vectors (elastic#143493) Fix IndexInputUtils.withSlice to produce native-safe MemorySegments on Java 21 (elastic#143479) CPS fix: include only relevant projects in the search response metadata (elastic#143367) apm-data: explicit map of timestamp.us to long (elastic#143173) [Inference API] Add custom headers for Azure OpenAI Service (elastic#142969) ESQL: Add name IDs to golden tests and fix synthetic names (elastic#143450) Add getUnavailableShards to BaseBroadcastResponse (elastic#143406) Add description to reindex API without sensitive info (elastic#143112) SQL: fix CLI tests (elastic#143451) ES|QL: Add note of future removal of FORK implicit LIMIT (elastic#143457) [Test] Randomly disable doc values skippers in time-series indices (elastic#143389) Improve pattern text downgrade license test (elastic#143102) [Transform] Stop transforms at the end of tests (elastic#139783) Mute org.elasticsearch.compute.lucene.read.ValueSourceReaderTypeConversionTests testLoadAll elastic#143471 ...
shmuelhanoch
pushed a commit
to shmuelhanoch/elasticsearch
that referenced
this pull request
Mar 4, 2026
…dAction` (elastic#143477) Today `TransportAwaitClusterStateVersionAppliedAction` remains subscribed to the `ClusterApplierService` after cancellation, and this subscription retains a reference to its inner listener even when complete. This commit moves to using a `SubscribableListener`, avoiding retaining the inner listener after completion, and subscribes directly to the `ClusterApplierService` so that it can unsubscribe promptly on cancellation.
This was referenced Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today
TransportAwaitClusterStateVersionAppliedActionremainssubscribed to the
ClusterApplierServiceafter cancellation, and thissubscription retains a reference to its inner listener even when
complete.
This commit moves to using a
SubscribableListener, avoiding retainingthe inner listener after completion, and subscribes directly to the
ClusterApplierServiceso that it can unsubscribe promptly oncancellation.