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

Only emit modify cache actions if cache's actual usage is above lower bound #562

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rguo-aws
Copy link
Contributor

Fixes #:

Description of changes:
Modify cache actions nowadays will reduce cache max capacity regardless of the actual usage of each cache. This will make users confused if they receive notices on cache actions being published but does not use i.e. fielddata cache at all.
So this PR will Take cache actual size into consideration and only emit modify cache actions if the cache actual usage is above lower bound

Tests:
testing in progress

If new tests are added, how long do the new ones take to complete

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

…actions if the cache actual usage is above lower bound
@rguo-aws rguo-aws added the enhancement Enhancements to existing codebase label Feb 27, 2021
@rguo-aws rguo-aws changed the title Only emit modify cache actions if the cache actual usage is above lower bound Only emit modify cache actions if cache's actual usage is above lower bound Feb 27, 2021
Comment on lines +63 to +64
AggregateMetric fieldDataCacheSizeGroupByAggregation,
AggregateMetric shardRequestCacheSizeGroupByAggregation) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we choose to add the FieldData and Request cache usage to Node Config Cache ?
Both of these will keep changing frequently and will require frequent cache updated. Why not use the Cache_FieldData_Size and Cache_Request_Size metrics available to us ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because the cache modify action is generated on master so it needs to collect cache size usage from each data node. We currently use NodeConfigCache as the temp storage layer to for those node level metics. Reading the Cache_FieldData_Size on master will provide cache usage on master only which is not what we want.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Enhancements to existing codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants