-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Make GetIndexAction cancellable #87681
Make GetIndexAction cancellable #87681
Conversation
The get-indices API does some nontrivial work on the master and at high index counts the response may be very large and could take a long time to compute. Some clients will time out and retry if it takes too long. Today this API is not properly cancellable which leads to a good deal of wasted work in this situation, and the potentially-enormous response is serialized on a transport worker thread. With this commit we make the API cancellable and move the serialization to a `MANAGEMENT` thread. Relates elastic#77466
Pinging @elastic/es-data-management (Team:Data Management) |
Hi @DaveCTurner, I've created a changelog YAML for you. |
Backporting this to 7.17 is debatable, although I think it's reasonable to do so. |
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.
LGTM, thanks David.
I wonder what other APIs we may need to make this change for?
(currently: cluster state, get snapshot, get mapping, segment stats APIs?)
💔 Backport failed
You can use sqren/backport to manually backport by running |
Thanks Martijn.
IMO all of them, at least it'd be great for cancellation to be an opt-out thing rather than opt-in. Unfortunately it's a bit hard to determine where to focus our efforts without evidence from users showing that cancellation support is needed, which is what happened here. I count 28 APIs that already support cancellation, which is a good start. |
The get-indices API does some nontrivial work on the master and at high index counts the response may be very large and could take a long time to compute. Some clients will time out and retry if it takes too long. Today this API is not properly cancellable which leads to a good deal of wasted work in this situation, and the potentially-enormous response is serialized on a transport worker thread. With this commit we make the API cancellable and move the serialization to a `MANAGEMENT` thread. Backport of elastic#87681 Relates elastic#77466
The get-indices API does some nontrivial work on the master and at high index counts the response may be very large and could take a long time to compute. Some clients will time out and retry if it takes too long. Today this API is not properly cancellable which leads to a good deal of wasted work in this situation, and the potentially-enormous response is serialized on a transport worker thread. With this commit we make the API cancellable and move the serialization to a `MANAGEMENT` thread. Backport of elastic#87681 Relates elastic#77466
The get-indices API does some nontrivial work on the master and at high index counts the response may be very large and could take a long time to compute. Some clients will time out and retry if it takes too long. Today this API is not properly cancellable which leads to a good deal of wasted work in this situation, and the potentially-enormous response is serialized on a transport worker thread. With this commit we make the API cancellable and move the serialization to a `MANAGEMENT` thread. Backport of #87681 Relates #77466
The get-indices API does some nontrivial work on the master and at high index counts the response may be very large and could take a long time to compute. Some clients will time out and retry if it takes too long. Today this API is not properly cancellable which leads to a good deal of wasted work in this situation, and the potentially-enormous response is serialized on a transport worker thread. With this commit we make the API cancellable and move the serialization to a `MANAGEMENT` thread. Backport of #87681 Relates #77466
I forgot to mention, but yes, I think this change also qualifies for backporting to 7.17.
+1
YMaybe we should have a meta issue for this. I will ask around whether this is a good idea. |
The get-indices API does some nontrivial work on the master and at high
index counts the response may be very large and could take a long time
to compute. Some clients will time out and retry if it takes too long.
Today this API is not properly cancellable which leads to a good deal of
wasted work in this situation, and the potentially-enormous response is
serialized on a transport worker thread.
With this commit we make the API cancellable and move the serialization
to a
MANAGEMENT
thread.Relates #77466