[ 
https://issues.apache.org/jira/browse/GEODE-9223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17343521#comment-17343521
 ] 

ASF subversion and git services commented on GEODE-9223:
--------------------------------------------------------

Commit 25e12fd1ba845172a8927246bbd0c0f5914d75a3 in geode's branch 
refs/heads/develop from Dan Smith
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=25e12fd ]

GEODE-9223: Removing ByteArrayWrapper from hashes  (#6434)

No longer keeping ByteArrayWrapper classes in memory for RedisHashes or
creating ByteArrayWrapper classes when performing hash operations.

The main change to the RedisHash data structure was to switch from a
HashMap<ByteArrayWrapper, ByteArrayWrapper> to a
Object2ObjectOpenCustomHashMap<byte[], byte[]>. This saves ~50 bytes for each
field in the hash to not have the wrappers. Removing the extra allocations when
performing hash operations also helps performance.

Also removing a couple of extra unneeded allocations during logging and message
parsing. We should always create ArrayLists, etc. with a size if it is known so
those objects don't have to resize during parsing/deserialization.

Moving the hash commands executor to a shared object rather than allocating it
for each operation, which is extra GC pressure we don't need.

Altering the test of the values we use for the constants in RedisHash. We were
previously computing the per field overhead for very small hashes and asserting
that the constants exactly match those numbers.

The new test instead computes an *average* per field overhead, and asserts that
the constant matches the average overhead.

This allows us to have a constant that provides a better estimate with
different numbers of fields. To reflect this, the tolerance in the later tests
that compare measured vs. computed overhead is now 3% instead of 5%.

These changes BREAK compatibility with geode 1.14. The serialization format for
RedisHash, AddsDeltaInfo, and RemsDeltaInfo has changed to not write
ByteArrayWrapper classes on the wire.

> Remove ByteArrayWrapper Usage from RedisHash
> --------------------------------------------
>
>                 Key: GEODE-9223
>                 URL: https://issues.apache.org/jira/browse/GEODE-9223
>             Project: Geode
>          Issue Type: Sub-task
>          Components: redis
>            Reporter: Wayne
>            Priority: Major
>              Labels: pull-request-available
>
> The classes RedisHash and NullRedisHash should be refactored to eliminate the 
> use of ByteArrayWrapper and use byte[] instead.
>  
> When used as a key in a GeodeRegion, the new RedisKey class should be used as 
> a key instead of byte[].
>   
> +Acceptance Criteria+
> After this refactor, we must verify that all existing regression tests run 
> without failure.  Using the Redis Benchmarking tools, we expect an 
> improvement in transaction throughput.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to