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 setting to enable/disable Thread Contention Monitoring #171

Merged
merged 2 commits into from
Apr 11, 2022

Conversation

eirsep
Copy link
Member

@eirsep eirsep commented Mar 21, 2022

Signed-off-by: Surya Sashank Nistala snistala@amazon.com

Is your feature request related to a problem? Please provide an existing Issue # , or describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you are proposing
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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

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.

@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2022

Codecov Report

Merging #171 (47c32c9) into main (9d81bd6) will increase coverage by 0.16%.
The diff coverage is 72.88%.

@@             Coverage Diff              @@
##               main     #171      +/-   ##
============================================
+ Coverage     71.61%   71.77%   +0.16%     
- Complexity      355      367      +12     
============================================
  Files            44       44              
  Lines          2459     2519      +60     
  Branches        160      169       +9     
============================================
+ Hits           1761     1808      +47     
- Misses          591      598       +7     
- Partials        107      113       +6     
Impacted Files Coverage Δ
...dler/PerformanceAnalyzerClusterSettingHandler.java 68.62% <52.38%> (-0.05%) ⬇️
...analyzer/config/PerformanceAnalyzerController.java 77.70% <70.00%> (-1.50%) ⬇️
...ig/setting/PerformanceAnalyzerClusterSettings.java 92.30% <100.00%> (+0.64%) ⬆️
...config/PerformanceAnalyzerClusterConfigAction.java 88.67% <100.00%> (+1.44%) ⬆️
...action/config/PerformanceAnalyzerConfigAction.java 93.18% <100.00%> (+0.97%) ⬆️

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 9d81bd6...47c32c9. Read the comment docs.

try {
threadContentionMonitoringEnabledFromConf = readBooleanFromFile(filePath);
} catch (NoSuchFileException e) {
LOG.debug("Error reading Performance Analyzer state from Conf file", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Error reading thread contention monitoring state?

Copy link
Contributor

Choose a reason for hiding this comment

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

@eirsep nit: I think this change was missed in the revision.

if (shouldEnable
&& !performanceAnalyzerController.isPerformanceAnalyzerEnabled()) {
return getChannelConsumerWithError(
"Error: PA not enabled. Enable PA before turning Batch Metrics on");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "Enable PA before turning thread contention monitoring on"

@@ -31,7 +31,7 @@ public void setup() {

@Test
public void disabledClusterStateTest() {
setControllerValues(DISABLED_STATE, DISABLED_STATE, DISABLED_STATE, DISABLED_STATE);
setControllerValues(DISABLED_STATE, DISABLED_STATE, DISABLED_STATE, DISABLED_STATE,DISABLED_STATE );
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: space before DISABLED_STATE.
I see a couple of formatting issues. Can we run ./gradlew spotlessApply

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
@sruti1312 sruti1312 requested a review from sgup432 April 11, 2022 16:48
@sruti1312 sruti1312 merged commit 908218e into opensearch-project:main Apr 11, 2022
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.

4 participants