Stanislav Lukyanov created IGNITE-13340:
-------------------------------------------

             Summary: copyOnRead=false doesn't work for byte array values
                 Key: IGNITE-13340
                 URL: https://issues.apache.org/jira/browse/IGNITE-13340
             Project: Ignite
          Issue Type: Bug
          Components: cache
            Reporter: Stanislav Lukyanov


If near cache is used and copyOnRead=false is set then the Java object should 
only be created on the first read, and all subsequent reads must use the same 
copy.

However, when byte array value is used (e.g. `put(42, new byte[100]`) then the 
copying is done on every read. It seems that the reason is that byte array 
values have their own implementation of `CacheObject` - 
`CacheObjectByteArrayImpl`. That implementation doesn't use 
`CacheObjectValueContext::storeValue` which controls whether copying needs to 
be done; CacheObjectImpl uses it.

Need to correctly implement copyOnRead=false for <X, byte[]> caches.



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

Reply via email to