Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13340

copyOnRead=false doesn't work for byte array values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • cache
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            slukyanov Stanislav Lukyanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: