ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanislav Lukyanov (Jira)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-13340) copyOnRead=false doesn't work for byte array values
Date Sat, 08 Aug 2020 03:58:00 GMT
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

View raw message