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

Add cache clear action in JVM decider #428

Merged
merged 2 commits into from
Sep 18, 2020
Merged

Conversation

rguo-aws
Copy link
Contributor

Fixes #:

Description of changes:
Add cache clear action in JVM decider. This action will be issued when the heap usage(after full GC) is above 90%. The default cool off period of this action is 30 mins

Tests:
created unit tests for this action type

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 feature New feature label Sep 17, 2020
@codecov
Copy link

codecov bot commented Sep 17, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@9a2624c). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #428   +/-   ##
=========================================
  Coverage          ?   71.64%           
  Complexity        ?     2564           
=========================================
  Files             ?      323           
  Lines             ?    14603           
  Branches          ?     1228           
=========================================
  Hits              ?    10462           
  Misses            ?     3753           
  Partials          ?      388           

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 9a2624c...fa4a461. Read the comment docs.

Comment on lines +121 to +122
CacheClearAction action = CacheClearAction
.newBuilder(appContext).build();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: same line?

Map<NodeKey, ImpactVector> impactedMap = new HashMap<>();
impactedNodes.forEach(node -> {
ImpactVector impactVector = new ImpactVector();
impactVector.decreasesPressure(HEAP);
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this action increase CPU pressure? Although, since this is an SoS action, we want it to go through and not get punted due to an existing high CPU metric. So it's probably okay to not include that as an impact (also may not always increase CPU if the cache items were not really being used).

@sidheart sidheart self-requested a review September 18, 2020 17:36
@rguo-aws rguo-aws merged commit 4eadc4e into master Sep 18, 2020
@rguo-aws rguo-aws deleted the rguo-cache-clear-action branch September 18, 2020 17:42
khushbr added a commit that referenced this pull request Sep 30, 2020
commit 240e046
Author: Joydeep Sinha <[email protected]>
Date:   Thu Sep 24 10:53:01 2020 -0700

    Update PULL_REQUEST_TEMPLATE.md

commit 5bd53d5
Author: Sruti Parthiban <[email protected]>
Date:   Wed Sep 23 11:07:02 2020 -0700

    Persist published actions in sqlite (#433)

    * Persist actions in sqlite

    * Address PR comments

commit dfa9c22
Author: Ruizhen Guo <[email protected]>
Date:   Tue Sep 22 13:05:11 2020 -0700

    Fix cache action to handle unbounded fielddata cache (#432)

commit f67e668
Author: Ruizhen Guo <[email protected]>
Date:   Mon Sep 21 14:48:04 2020 -0700

    enable JVM decider in graph (#431)

commit abc7b12
Author: Vigya Sharma <[email protected]>
Date:   Fri Sep 18 10:47:44 2020 -0700

    Rename config folder to configs (#429)

commit 4eadc4e
Author: Ruizhen Guo <[email protected]>
Date:   Fri Sep 18 10:42:53 2020 -0700

    Add cache clear action in JVM decider (#428)

commit 54e61c5
Author: Karthik Kumarguru <[email protected]>
Date:   Thu Sep 17 11:33:37 2020 -0700

    Re enable config overrides test (#427)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants