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

IMap stats showing negative values #4022

Closed
jeffastorey opened this issue Nov 6, 2014 · 12 comments

Comments

Projects
None yet
6 participants
@jeffastorey
Copy link

commented Nov 6, 2014

I'm using hazelcast 2.6.7 and after heavy usage of the cache, the number of misses starts showing up negative. Specifically, it is being reported as the negative of the number of hits (e.g. if hits = 20, misses = -20). I'm getting the map stats as follows:

LocalMapStats mapStats = HazelcastCache.instance.getMap("myMap").getLocalMapStats();
long hits = mapStats.getHits();
long misses = mapStats.getMisses();

@mdogan mdogan added 2.x labels Nov 7, 2014

@jeffastorey

This comment has been minimized.

Copy link
Author

commented Nov 12, 2014

I have done some more research to try and figure out what is going on, and I believe the same problem still exists in 3.x as well. When a node is stopped and then restarted, some of the the stats for that node are restored, but not all of them. The hits are restored, but the total get operation count is not. To reproduce this problem reliably, do the following:

  • start a 2 node cluster
  • run some operations that do some puts/gets on the cache
  • restart one of the nodes
  • on the restarted node, the total number of hits will be restored, but the number of gets will not. This leads to a negative value for the misses (if being computed by gets - hits).

I'm not yet sure under what other circumstance this happens, such as adding a new node to the cluster.

@mdogan mdogan removed the 2.x label Nov 12, 2014

@mdogan

This comment has been minimized.

Copy link
Member

commented Nov 12, 2014

Which exact version have you tried for 3.x?

@jeffastorey

This comment has been minimized.

Copy link
Author

commented Nov 12, 2014

Both 3.2.3 and 3.3.2

@mdogan mdogan added the Team: Core label Nov 13, 2014

@jeffastorey

This comment has been minimized.

Copy link
Author

commented Nov 21, 2014

Any updates here or have you been able to confirm reproducing this?

@jeffastorey jeffastorey changed the title Cache stats showing negative values in 2.6.7 Cache stats showing negative values Nov 21, 2014

@ahmetmircik

This comment has been minimized.

Copy link
Member

commented Nov 24, 2014

Currently this is not supported. Number of get/put operations calculation is a node specific calculation so they can not be reached on another node in case of a node failure/restart, they have no backups.

@jeffastorey

This comment has been minimized.

Copy link
Author

commented Nov 24, 2014

I'm not necessarily looking for backups on gets/puts. It's ok if those reset when the node resets. The problem though is that the misses now show as negative.
There is some inconsistency because the number of hits is backed up, but the number of misses is not. So once a node gets reset, there is no longer a way to correctly compute the cache hit rate.

@ahmetmircik ahmetmircik added Type: Defect and removed PENDING labels Nov 24, 2014

@ahmetmircik ahmetmircik added this to the 3.4 milestone Nov 24, 2014

@ahmetmircik

This comment has been minimized.

Copy link
Member

commented Nov 24, 2014

Yes you are right. This needs to be fixed.

@ahmetmircik ahmetmircik self-assigned this Nov 24, 2014

@jeffastorey

This comment has been minimized.

Copy link
Author

commented Nov 24, 2014

Great, thank you.

@ahmetmircik ahmetmircik modified the milestones: 3.4.1, 3.4 Nov 26, 2014

@ahmetmircik ahmetmircik modified the milestones: 3.5, 3.4.1 Dec 18, 2014

@ahmetmircik ahmetmircik modified the milestones: 3.6, 3.5 May 28, 2015

@oobles

This comment has been minimized.

Copy link

commented Sep 24, 2015

+1. Would be nice to see this fixed. It's not even clear what this actually means. It would be useful to use this information to better configure maps, but this information is not useful.

some_map
Size 153,
Get operation count 22050 (hits 43947/misses -21897),
Put operation count 22050,
get remove operation count 0,
Other operation count 716795

@gurbuzali gurbuzali changed the title Cache stats showing negative values IMap stats showing negative values Oct 27, 2015

@mdogan

This comment has been minimized.

Copy link
Member

commented Nov 27, 2015

@ahmetmircik: is this planned for 3.6?

@enesakar

This comment has been minimized.

Copy link
Member

commented Nov 27, 2015

@muratayan can you work on this issue?

@muratayan

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2015

I am on it.

@muratayan muratayan modified the milestones: 3.7, 3.6 Nov 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.