Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Docs Required, Release Notes Required
Description
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.