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
IGNITE-14383 No need to update metastorage if cache statistics disabled #8924
base: master
Are you sure you want to change the base?
Conversation
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
Outdated
Show resolved
Hide resolved
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
Outdated
Show resolved
Hide resolved
for (IgniteBiTuple<CacheGroupContext, Boolean> grp : grpsToStop) | ||
stopCacheGroup(grp.get1().groupId(), grp.get2()); | ||
for (IgniteBiTuple<CacheGroupContext, Boolean> grp : grpsToStop) { | ||
Boolean stat = grpMetricsToStop.get(grp.get1().groupId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we really need intermediate grpMetricsToStop
map?
Let's just calculate statisticsEnabled
flag right in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep ... cause upper we removes it context : prepareCacheStop -> sharedCtx.removeCacheContext(ctx);
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
Outdated
Show resolved
Hide resolved
@@ -3262,6 +3281,8 @@ public void processStatisticsModeChange(CacheStatisticsModeChangeMessage msg) { | |||
private void stopCachesOnClientReconnect(Collection<GridCacheAdapter> stoppedCaches) { | |||
assert ctx.discovery().localNode().isClient(); | |||
|
|||
boolean stat = stoppedCaches.stream().anyMatch(c -> c.context().statisticsEnabled()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stat -> removeMetrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
Outdated
Show resolved
Hide resolved
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
Outdated
Show resolved
Hide resolved
@zstan What if
It seems this scenario will lead to a situation when we don't clear meta storage properly. And what is the issue with removing unexisting keys in the first place? |
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summary
whereXXXX
- number of JIRA issue.(see the Maintainers list)
the
green visa
attached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.