Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14356

Infinispan heap-memory caches transcoding key/values unnecessarily

    XMLWordPrintable

Details

    Description

      For local "heap-memory" caches, each key/value stored are being converted to a byte[] unnecessarily.

      The reason that this conversion is taking place, is due to a combination of 1) the key/value encoding type of Wildfly's "heap-memory" caches not being explicitly configured. 2) Wildfly using Infinispan in server mode by configuring [1]. This causes Infinispan `StorageConfigurationManager`[2] to configure the storage media type as `application/unknown`, which results in the `application/x-java-object` key/values being converted to byte[] on every put operation.

      The simplest solution is to update the "heap-memory" caches to explicitly configure the encoding as `application/x-java-object`. This will be mandatory in future versions anyway, as the `application/unknown` type has been deprecated.

      [1] https://github.com/wildfly/wildfly/blob/2bed1cae0c56d697ee0fc80b7f339085a164fac6/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/GlobalConfigurationServiceConfigurator.java#L142-L143
      [2] https://github.com/infinispan/infinispan/blob/0454c2368ad8365c93042a9e5155de662fe34eeb/core/src/main/java/org/infinispan/encoding/impl/StorageConfigurationManager.java#L93-L115

      Attachments

        Activity

          People

            pferraro@redhat.com Paul Ferraro
            remerson@redhat.com Ryan Emerson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: