-
Notifications
You must be signed in to change notification settings - Fork 2.3k
add cancellation check in FetchPhase for Agg reductions #18673
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
base: main
Are you sure you want to change the base?
add cancellation check in FetchPhase for Agg reductions #18673
Conversation
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
|
Follow up PR to #18426 and covering the FetchPhase Tagging @jainankitk , @jed326 and @sgup432 for review |
|
❌ Gradle check result for 4093508: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Looking into test failures |
Signed-off-by: Kaushal Kumar <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18673 +/- ##
============================================
+ Coverage 72.72% 72.74% +0.02%
- Complexity 68409 68439 +30
============================================
Files 5566 5568 +2
Lines 314292 314369 +77
Branches 45579 45586 +7
============================================
+ Hits 228554 228691 +137
+ Misses 67153 67105 -48
+ Partials 18585 18573 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sgup432
left a comment
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 see we are changing all the desired method signatures to pass the cancellation checks. Doesn't look a nice way to do it.
Instead, I was thinking whether we can create a generic framework(or maybe reuse existing) where we can pass this isTaskCancelled in a more efficient way without change method signatures?
Like maybe storing this info in ThreadLocal(or reusing ThreadContext) where every thread has this info and which can also be propagated along? And we can directly call a static method and fetch that info.
This way we could use this framework for later usecases as well to extend the soft cancellation checks.
|
Thanks @sgup432 ! It is a valid suggestion and I agree that the propagation of task cancellation is not very clean but even to pass the I feel maybe we need to give it more thought to refactor the query lifecycle in such a way that it is less intrusive to access the request state. |
|
This PR is stalled because it has been open for 30 days with no activity. |
jainankitk
left a comment
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.
Thanks @kaushalmahi12 for raising this PR. While the functionality itself of being able to effectively cancel the long running search tasks is really useful, we should look into better ways of achieving the same to also ensure the backward compatibility across versions.
|
@kaushalmahi12 - Can we move this PR into draft state until we resume active work on it? |
|
This PR is stalled because it has been open for 30 days with no activity. |
|
This PR is stalled because it has been open for 30 days with no activity. |
Description
This change introduces cancellation checks for early termination in FetchPhase during shard level reduce and co-ordinator level reduce.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.