Skip to content
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

Minor bug fix related to cluster manager throttling settings #5524

Merged
merged 4 commits into from
Dec 16, 2022

Conversation

dhwanilpatel
Copy link
Contributor

Signed-off-by: Dhwanil Patel dhwanip@amazon.com

Description

Below bug fix related to cluster manager throttling thresholds settings.

  • While setting null value to the already configured key, it was not clearing the limits from the threshold map.
  • While bootstrapping, it was not applying already configured settings.

Fixed above both bugs in this PR and added relevant UTs for it.

Issues Resolved

#479

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@dhwanilpatel dhwanilpatel force-pushed the main-throttling-bugfix branch from a3f9070 to dd9c714 Compare December 12, 2022 14:19
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.stats.IndexStatsIT.testFilterCacheStats

@dhwanilpatel dhwanilpatel force-pushed the main-throttling-bugfix branch from dd9c714 to 27ce1fe Compare December 12, 2022 16:32
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Dhwanil Patel <dhwanip@amazon.com>
@dhwanilpatel dhwanilpatel force-pushed the main-throttling-bugfix branch from 27ce1fe to a5998a8 Compare December 13, 2022 04:30
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2022

Codecov Report

Merging #5524 (b863d23) into main (ceca161) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #5524      +/-   ##
============================================
+ Coverage     70.93%   70.96%   +0.02%     
+ Complexity    58291    58257      -34     
============================================
  Files          4730     4730              
  Lines        278230   278237       +7     
  Branches      40243    40244       +1     
============================================
+ Hits         197375   197439      +64     
+ Misses        64731    64645      -86     
- Partials      16124    16153      +29     
Impacted Files Coverage Δ
...h/cluster/service/ClusterManagerTaskThrottler.java 88.88% <100.00%> (+1.05%) ⬆️
.../org/opensearch/cluster/service/MasterService.java 84.49% <100.00%> (ø)
...search/indices/recovery/RecoveryTargetHandler.java 0.00% <0.00%> (-100.00%) ⬇️
...aggregations/bucket/histogram/ParsedHistogram.java 47.61% <0.00%> (-42.86%) ⬇️
...rch/client/transport/NoNodeAvailableException.java 28.57% <0.00%> (-42.86%) ⬇️
...h/action/ingest/SimulateDocumentVerboseResult.java 60.71% <0.00%> (-39.29%) ⬇️
...regations/metrics/AbstractHyperLogLogPlusPlus.java 51.72% <0.00%> (-37.94%) ⬇️
...java/org/opensearch/threadpool/ThreadPoolInfo.java 56.25% <0.00%> (-37.50%) ⬇️
...ion/admin/cluster/node/info/PluginsAndModules.java 53.12% <0.00%> (-34.38%) ⬇️
...opensearch/index/reindex/BulkByScrollResponse.java 48.38% <0.00%> (-29.04%) ⬇️
... and 489 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Dhwanil Patel <dhwanip@amazon.com>
@dhwanilpatel dhwanilpatel force-pushed the main-throttling-bugfix branch from 426cfb9 to b863d23 Compare December 13, 2022 05:35
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I have some nits. CHANGELOG changes are needed, the rest we can debate if you want.

CHANGELOG.md Outdated Show resolved Hide resolved
settingKeys.addAll(tasksThreshold.keySet());
for (String key : settingKeys) {
Settings setting = groups.get(key);
if (setting == null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can use .orElse kind of thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here if setting is not null we want to get specific value from it, so orElse might not work here.

To improve readability, I have used ternary operator, let me know if that helps.

Signed-off-by: Dhwanil Patel <dhwanip@amazon.com>
Signed-off-by: Dhwanil Patel <dhwanip@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@dblock dblock merged commit b782299 into opensearch-project:main Dec 16, 2022
@dblock dblock added the backport 2.x Backport to 2.x branch label Dec 16, 2022
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-5524-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b782299e4ef26df87e0a144ce30c8a6d43381af2
# Push it to GitHub
git push --set-upstream origin backport/backport-5524-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-5524-to-2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants