Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix bug in publisher to support cool off period on a per node basis #351

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

rguo-aws
Copy link
Contributor

@rguo-aws rguo-aws commented Aug 7, 2020

Issue #:
#352

Description of changes:
The current implementation of cool off action map only take action.name() as the hashkey and map it to the execution time. This is incorrect because if let's say we have two actions of the same type but has different target (impacted) nodes. One action will be published while the other will be blocked. This is not the expected behavior as both actions should be published if their impacted nodes are not overlapped. We should use action.name() + nodekey as the hashkey instead.

In this PR, I moved the cool off action map into a separate class namely CoolOffDetector and extend the hashmap to support hashkey as action.name() + nodekey.

Tests:
n/a

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rguo-aws rguo-aws added the bug Something isn't working label Aug 7, 2020
@yojs
Copy link
Contributor

yojs commented Aug 7, 2020

Can we add an issue for this PR ?

@codecov
Copy link

codecov bot commented Aug 7, 2020

Codecov Report

Merging #351 into master will increase coverage by 0.02%.
The diff coverage is 93.18%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #351      +/-   ##
============================================
+ Coverage     67.22%   67.25%   +0.02%     
- Complexity     2043     2049       +6     
============================================
  Files           297      298       +1     
  Lines         13137    13168      +31     
  Branches       1083     1087       +4     
============================================
+ Hits           8832     8856      +24     
- Misses         3913     3917       +4     
- Partials        392      395       +3     
Impacted Files Coverage Δ Complexity Δ
...nalyzer/decisionmaker/actions/CoolOffDetector.java 92.50% <92.50%> (ø) 10.00 <10.00> (?)
...anceanalyzer/decisionmaker/deciders/Publisher.java 59.45% <100.00%> (-7.94%) 10.00 <1.00> (-2.00)
...erformanceanalyzer/rca/scheduler/RCAScheduler.java 66.17% <0.00%> (-2.95%) 9.00% <0.00%> (ø%)
.../performanceanalyzer/rca/framework/core/Stats.java 97.82% <0.00%> (-2.18%) 22.00% <0.00%> (-1.00%)
...csearch/performanceanalyzer/rca/RcaController.java 80.33% <0.00%> (-0.57%) 36.00% <0.00%> (-1.00%)

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 87f0721...636d19b. Read the comment docs.

@rguo-aws rguo-aws merged commit ee58207 into master Aug 7, 2020
@rguo-aws rguo-aws deleted the rguo-bug-fix2 branch August 7, 2020 18:43
khushbr pushed a commit that referenced this pull request Sep 30, 2020
Changes for 1 package (OpenDistroPerformanceAnalyzerEngine), pushed in snapshot...

  https://code.amazon.com/snapshots/partsrut/2020-08-08T02-49-04

Changes for OpenDistroPerformanceAnalyzerEngine package:

0194f9f Fix failing reaction wheel tests
bfdb93d Merge remote-tracking branch 'upstream/master'
e03a120 Use StringUtils instead of NumberUtils to check timestamp string (#360)
79841f2 Expose queue rejection time period setting in rca.conf (#356)
f9dfda5 Implement isMuted method in DummyAction (#355)
7ede0b9 Reader changes for dynamic enable/disable of RCA graph components (#325)
ee58207 Fix bug in publisher to support cool off period on a per node basis (#351)

cr https://code.amazon.com/reviews/CR-31344155
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

publisher cool off issue which blocks same type of actions with different impact nodes
3 participants