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

make jvm heap usage a dynamic setting #1212

Merged
merged 3 commits into from
May 29, 2024

Conversation

jackiehanyang
Copy link
Collaborator

@jackiehanyang jackiehanyang commented May 28, 2024

Description

make jvm heap usage a dynamic setting

Issues Resolved

#1213

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: Jackie Han <jkhanjob@gmail.com>
Copy link
Collaborator

@kaituo kaituo left a comment

Choose a reason for hiding this comment

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

Will wait for you to do an e2e testing.

import org.opensearch.common.settings.Setting;
import org.opensearch.timeseries.settings.DynamicNumericSetting;

public class MemoryCircuitBreakerNumericSetting extends DynamicNumericSetting {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you move your code to ADNumericSetting ? We don't need to create a new class for each setting. Also, we covered setting init in TimeSeriesAnalyticsPlugin. Once you moved your code to ADNumericSetting, we don't need another call to initialize memory circuit breaker setting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moved the logic to ADNumericSetting file in the latest revision

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
@jackiehanyang
Copy link
Collaborator Author

Will wait for you to do an e2e testing.

Will do an e2d test when both 2.15 changes are done. Tracking it here - #1213

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
@jackiehanyang
Copy link
Collaborator Author

did e2e testing and verified result with Kaituo offline

@jackiehanyang jackiehanyang merged commit 2ce5a7c into opensearch-project:main May 29, 2024
21 of 25 checks passed
@opensearch-trigger-bot
Copy link

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:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/anomaly-detection/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/anomaly-detection/backport-2.x
# Create a new branch
git switch --create backport/backport-1212-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2ce5a7c96420513c8a88fb91257577f40a79cee9
# Push it to GitHub
git push --set-upstream origin backport/backport-1212-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/anomaly-detection/backport-2.x

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

jackiehanyang added a commit to jackiehanyang/anomaly-detection that referenced this pull request Jun 3, 2024
* make jvm heap usage a dynamic setting

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* move jvm_heap_usage_threshold setting to ADNumericSetting file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update jvm threshold setting name

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
(cherry picked from commit 2ce5a7c)
jackiehanyang added a commit to jackiehanyang/anomaly-detection that referenced this pull request Jun 3, 2024
* make jvm heap usage a dynamic setting

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* move jvm_heap_usage_threshold setting to ADNumericSetting file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update jvm threshold setting name

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
(cherry picked from commit 2ce5a7c)
jackiehanyang added a commit that referenced this pull request Jun 4, 2024
* make jvm heap usage a dynamic setting

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* move jvm_heap_usage_threshold setting to ADNumericSetting file

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

* update jvm threshold setting name

Signed-off-by: Jackie Han <jkhanjob@gmail.com>

---------

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
(cherry picked from commit 2ce5a7c)

Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants