-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix a bug in Search Backpressure #6455
Fix a bug in Search Backpressure #6455
Conversation
Signed-off-by: PritLadani <pritkladani@gmail.com>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #6455 +/- ##
============================================
+ Coverage 70.76% 70.83% +0.07%
+ Complexity 59093 59068 -25
============================================
Files 4802 4800 -2
Lines 282793 282712 -81
Branches 40782 40763 -19
============================================
+ Hits 200111 200261 +150
+ Misses 66271 66003 -268
- Partials 16411 16448 +37
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: PritLadani <pritkladani@gmail.com>
Gradle Check (Jenkins) Run Completed with:
|
@reta can you please help to merge this small bug fix CR? |
CHANGELOG.md
Outdated
@@ -70,6 +70,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | |||
## [Unreleased 2.x] | |||
### Added | |||
- Add GeoTile and GeoHash Grid aggregations on GeoShapes. ([#5589](https://github.com/opensearch-project/OpenSearch/pull/5589)) | |||
- Small bug fix in Search Backpressure's HeapUsageTracker ([#6455](https://github.com/opensearch-project/OpenSearch/pull/6455)) |
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.
For small non-customer facing changes , we can skip the changelog.
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.
okay, removing it.
@PritLadani my apologies, I am on vacation the rest of the week |
This reverts commit bce2756.
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: PritLadani <pritkladani@gmail.com>
@@ -107,7 +107,7 @@ public static boolean isHeapTrackingSupported() { | |||
*/ | |||
public static boolean isHeapUsageDominatedBySearch(List<CancellableTask> cancellableTasks, double heapPercentThreshold) { | |||
long usage = cancellableTasks.stream().mapToLong(task -> task.getTotalResourceStats().getMemoryInBytes()).sum(); | |||
long threshold = (long) heapPercentThreshold * HEAP_SIZE_BYTES; | |||
long threshold = (long) (heapPercentThreshold * HEAP_SIZE_BYTES); |
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.
nit: Good to have one unit test which verifies this change
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.
@PritLadani Can you add unit tests here in a follow up PR? This is a public static method and should be pretty straightforward to unit test.
Done here. #6463
Thanks!
Gradle Check (Jenkins) Run Completed with:
|
Tracking in #6459
|
Can you provide a more descriptive commit message/PR title? Something like "Fix integer math bug in HeapUsageTracker" |
@PritLadani : The DCO check is failing right now. Can you please fix this |
@dreamer-89 looks like the offending commit is the revert. Since we're trying to merge this as a critical bugfix for the 2.6 release, I'll go ahead and set the DCO check to pass and merge this in. Let me know if you've got any concerns. |
@PritLadani Can you add unit tests here in a follow up PR? This is a public static method and should be pretty straightforward to unit test. |
* Fix a bug in Search Backpressure Signed-off-by: PritLadani <pritkladani@gmail.com> --------- Signed-off-by: PritLadani <pritkladani@gmail.com> (cherry picked from commit d439244) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix a bug in Search Backpressure Signed-off-by: PritLadani <pritkladani@gmail.com> --------- Signed-off-by: PritLadani <pritkladani@gmail.com> (cherry picked from commit d439244) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix a bug in Search Backpressure --------- (cherry picked from commit d439244) Signed-off-by: PritLadani <pritkladani@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix a bug in Search Backpressure --------- (cherry picked from commit d439244) Signed-off-by: PritLadani <pritkladani@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Bug-fix in Search Backpressure's HeapUsageTracker.
Issues Resolved
#5173
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.
Signed-off-by: PritLadani pritkladani@gmail.com