Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2020

MarshalledValues to not compact eagerly

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • 5.1.4.FINAL
    • Marshalling
    • None
    • Medium

    Description

      Marshalled values currently get compacted aggressively, limiting usability as a form of class loader isolation. E.g.,

      Node 1: put(k, v) results in v being wrapped in a MarshalledValue, the instance field being set, the raw field being generated when serialization is needed, and as the put call returns, the raw field is un-set. This is fine for the most part, except when state transfer kicks in, and the entry needs to be transferred elsewhere. The instance may not be serialized since an application specific class loader may not be available at this time.

      This proposal is to add the following:

      1. A new configuration option, eagerCompacting, defaulting to true (current behaviour).
      2. If set to false, the raw representation is kept around, and can be reused, effectively working around the class loader problem.
      3. The drawback here would be the additional memory needed to store the second reference on the originator, but the benefit of not having to serialize as often should offset this.

      Compacting then can still happen on the originator by manually triggering the cache#compact() API.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              manik_jira Manik Surtani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: