forked from apache/geode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GEODE-9493: rework sizing of RedisString, RedisHash, RedisSet, and Re…
…disSortedSet (apache#6727) Removed SizeableObjectSizer and made the Sizeable redis classes abstract. They now require subclasses that implement sizeKey, sizeValue, or sizeElement. Instead of having hard coded constants stating what the size of a redis base class is, the code now uses JvmSizeUtils.memoryOverhead(Class) to statically compute the class size overhead. This allows the size to be correct for different jvm configs. Also simplified the sizing logic to use int and if needed use casts instead of narrow. Narrow was more expensive and would still cause problems as the size goes back down toward zero. The sizing of OrderStatisticsTree was simplified some more since it did not need an extra int field since we do not keep track of its element sizes. Also the size of the hashing strategy object is no longer accounted for since it is a singleton. OrderStatisticsTree has been simplified to not size the elements it contains. It is currently only used by RedisSortedSet and it does not need the element size to be computed (it already is done in the hash map it also uses). If in the future we need to also size the elements of an OrderStatisticsTree we can figure out the best way to do that then in that new context.
- Loading branch information
1 parent
9bdfd13
commit 1210cbc
Showing
26 changed files
with
447 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.