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

Adds cluster setting to configure index state management jitter #153

Merged
merged 2 commits into from
Oct 29, 2021

Conversation

downsrob
Copy link
Contributor

@downsrob downsrob commented Sep 23, 2021

Signed-off-by: Clay Downs downsrob@amazon.com

Description of changes: Adds cluster setting to allow users to enable and configure the jitter setting for index state management jobs. The purpose of the jitter is to add a randomized delay to the start time of ISM jobs to make sure that all indices do not become active at the same time. The jitter is stored as a double and represents the maximum percentage of the job interval to add to the job start time. The default jitter is 0.6, and the cluster setting resides under plugins.index_state_management.jitter.

The job scheduler has another configurable cluster setting, jitter_limit, which represents the maximum jitter which may be applied to the job. The jitter cluster setting may be higher than this limit, but jitter times will be capped to the jitter_limit percentage of the job interval. The job scheduler jitter_limit default is 0.6.

At this time, modifying the jitter cluster setting will only apply the changed jitter to newly created jobs.

CheckList:

  • Commits are signed per the DCO using --signoff

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: Clay Downs <downsrob@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2021

Codecov Report

Merging #153 (3aea0a5) into main (dafd3bb) will decrease coverage by 0.06%.
The diff coverage is 92.85%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #153      +/-   ##
============================================
- Coverage     75.88%   75.82%   -0.07%     
+ Complexity     1922     1916       -6     
============================================
  Files           260      260              
  Lines         10992    11014      +22     
  Branches       1720     1721       +1     
============================================
+ Hits           8341     8351      +10     
- Misses         1699     1705       +6     
- Partials        952      958       +6     
Impacted Files Coverage Δ
...t/indexstatemanagement/model/ManagedIndexConfig.kt 78.09% <75.00%> (-0.70%) ⬇️
...pensearch/indexmanagement/IndexManagementPlugin.kt 92.68% <100.00%> (+0.03%) ⬆️
...nt/indexstatemanagement/ManagedIndexCoordinator.kt 72.82% <100.00%> (+0.38%) ⬆️
...exstatemanagement/settings/ManagedIndexSettings.kt 99.10% <100.00%> (+0.05%) ⬆️
...sport/action/addpolicy/TransportAddPolicyAction.kt 59.09% <100.00%> (+0.81%) ⬆️
...ent/indexstatemanagement/util/ManagedIndexUtils.kt 79.31% <100.00%> (+0.08%) ⬆️
...arch/indexmanagement/rollup/RollupSearchService.kt 57.40% <0.00%> (-3.71%) ⬇️
...rch/indexmanagement/rollup/model/RollupMetadata.kt 82.73% <0.00%> (-1.79%) ⬇️
...ensearch/indexmanagement/rollup/model/ISMRollup.kt 92.98% <0.00%> (-1.76%) ⬇️
...earch/indexmanagement/transform/model/Transform.kt 86.00% <0.00%> (-1.50%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dafd3bb...3aea0a5. Read the comment docs.

@downsrob downsrob marked this pull request as ready for review September 24, 2021 00:02
@downsrob downsrob changed the title Jitter setting Adds cluster setting to configure index state management job jitter Sep 24, 2021
@downsrob downsrob changed the title Adds cluster setting to configure index state management job jitter Adds cluster setting to configure index state management jitter Sep 24, 2021
Signed-off-by: Clay Downs <downsrob@amazon.com>
@@ -179,5 +180,14 @@ class ManagedIndexSettings {
Setting.Property.NodeScope,
Setting.Property.Dynamic
)

val JITTER: Setting<Double> = Setting.doubleSetting(
"plugins.index_state_management.jitter",
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: Do you think it makes sense to set this setting at index_management level so it can be applied to other features of index management in future if needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that if a jitter setting is added to the other features of index management then it would make sense to have the setting feature-scoped by adding it as a setting at the transforms or rollups level, as I don't think a user's setting of jitter for index management would directly relate to how that user might want to configure a potential rollup jitter.

@downsrob downsrob merged commit ab12279 into opensearch-project:main Oct 29, 2021
@downsrob downsrob deleted the jitter-setting branch October 29, 2021 19:51
downsrob added a commit that referenced this pull request Nov 5, 2021
* Add integTest script to the repo (#94)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Removing Usages of Action Get Call and using listeners (#100)

Signed-off-by: Aditya Jindal <aditjind@amazon.com>

* Enhance ISM template (#105)

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Explain response still use old opendistro policy id (#109)

* Explain response still use old opendistro policy id
* Use hardcoded policyid setting in tests for explain response
* Trying to fix flaky tests

* Storing user information as part of the job when security plugin is installed (#113)

Signed-off-by: Ravi Thaluru <ravi1092@gmail.com>

* ISM/Notification channel support (#117)

* Updates NAME of transport actions

* Upgrades Kotlin version, updates dependencies on other OS plugins, adds notification plugin as a test resource and includes it in test clusters

* Adds support for Channels in error notifications and notification actions

* Adds support for sending notifications to channels

* Adds support for publishing notifications to the legacy destinations through the Notification plugin and some cleanup

* Removes notification alerting jar dependency

* Adds compile only dep on commons codec for digest utils sha1 method in ism rollup

* Updates Error Notification to make channel/destination nullable, and adds helper methods for publish calls

* Constructs URL for legacy custom webhook

Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>

* Fixes Feature enum and dep

Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>

* Trying something else

Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>

* Addresses comments

Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>

* Storing user object in all APIs and enabling filter of response based on user (#115)

Signed-off-by: Ravi Thaluru <ravi1092@gmail.com>

* Upgrade dependencies to 1.1 and build snapshot by default. (#121)

Signed-off-by: dblock <dblock@amazon.com>

* Security improvements  (#126)

Signed-off-by: Ravi Thaluru <ravi1092@gmail.com>

* Removes support for notification plugin (#136)

Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>

* Updating security filtering logic (#137)

Signed-off-by: Ravi Thaluru <ravi1092@gmail.com>

* Release note for 1.1.0.0 release. (#139)

* Release note for 1.1.0.0 release.

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Correct copyright notices

* Uses published daily snapshot dependencies (#141)

Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>

* License header check (#142)

* Provide default copyright header using IDE feature

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Address #103

history write index is rolled over even if the history indices are
disabled

* Removed integtest.sh. (#148)

Signed-off-by: dblock <dblock@dblock.org>

* Adds mavenLocal back to repositories (#158)

Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>

* Making snapshot name to scripted input in template  (#77)

Signed-off-by: Ravi Thaluru <ravi1092@gmail.com>

* Fix issues with security changes in rollup runnner (#161)

* Updates index management version to 1.2 (#157)

* Updates index management version to 1.2

* Updates job scheduler snapshot to 1.2 in test resources

Signed-off-by: Robert Downs <downsrob@amazon.com>

* Adds setting to search all rollup jobs on a target index (#165)

* Adds cluster setting to search all rollup jobs

Signed-off-by: Clay Downs <downsrob@amazon.com>

* Adds implementation for the delay feature in rollup jobs (#147)

* Adds delay implementation for rollup jobs

* Removes non-continuous delay implementation

* Adds additional rollup delay tests

Signed-off-by: Clay Downs <downsrob@amazon.com>

* Updates testCompile mockito version, adds AwaitsFix annotation to MetadataRegressionIT tests (#168)

* Updates testCompile mockito version to match OpenSearch changes

* AwaitsFix on the failing MetadataRegressionIT tests

Signed-off-by: Robert Downs <downsrob@amazon.com>

* Adds cluster setting to configure index state management jitter (#153)

* Adds jitter cluster setting, sets jitter to 0 for ISM tests

Signed-off-by: Clay Downs <downsrob@amazon.com>

* Allows out of band rollovers on an index without causing ISM to fail (#180)

* Allows out of band rollovers on an index without causing ISM to fail

Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>

* Fixes detekt issue

Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>

* Remove policy API on read only indices (#182)

* In explain API not showing the total count to all users (#185)

Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
Co-authored-by: Aditya Jindal <13850971+aditjind@users.noreply.github.com>
Co-authored-by: Bowen Lan <62091230+bowenlan-amzn@users.noreply.github.com>
Co-authored-by: Ravi <6005951+thalurur@users.noreply.github.com>
Co-authored-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>
Co-authored-by: Daniel Doubrovkine (dB.) <dblock@dblock.org>
wuychn pushed a commit to ochprince/index-management that referenced this pull request Mar 16, 2023
…search-project#153)

* Adds jitter cluster setting, sets jitter to 0 for ISM tests

Signed-off-by: Clay Downs <downsrob@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants