Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-26581

Different Transient Stores must use different namespaces

    XMLWordPrintable

    Details

    • Backlog priority:
      700
    • Impact type:
      Configuration Change
    • Upgrade notes:
      Hide

      Transient stores with different names now use different storage.

      To configure transient stores you can now just configure the default one. If an internal Nuxeo service requests a specific non-default one, its configuration will take into account the default configuration in addition to whatever (if anything) is configured for the specific one.

      For instance the default Nuxeo template now contains:

        <extension target="org.nuxeo.ecm.core.transientstore.TransientStorageComponent"  point="store">
          <store name="default" class="org.nuxeo.ecm.core.transientstore.keyvalueblob.KeyValueBlobTransientStore">
            <targetMaxSizeMB>-1</targetMaxSizeMB>
            <absoluteMaxSizeMB>-1</absoluteMaxSizeMB>
            <firstLevelTTL>240</firstLevelTTL>
            <secondLevelTTL>10</secondLevelTTL>
          </store>
      
          <store name="authorizationRequestStore">
            <firstLevelTTL>10</firstLevelTTL>
            <secondLevelTTL>0</secondLevelTTL>
          </store>
        </extension>

      This shows that the implementation class needs to be defined only once in the default configuration, and other configurations can override some parameters if needed.

      As a further example, when the redis template is enabled and you exlicitly set nuxeo.transientstore.provider=redis (which is not the default), then the following is added automatically and is enough to switch all transient stores to the new class (unless a specific non-default transient store has defined its own class):

        <extension target="org.nuxeo.ecm.core.transientstore.TransientStorageComponent" point="store">
          <store name="default" class="org.nuxeo.ecm.core.redis.contribs.RedisTransientStore"/>
        </extension>
      

      In addition, if a KeyValueBlobTransientStore is configured without an explicit <keyValueStore> or <blobProvider>, it will automatically use a key/value store or blob provider named transient_ followed by the transient store id.

      Show
      Transient stores with different names now use different storage. To configure transient stores you can now just configure the default one. If an internal Nuxeo service requests a specific non- default  one, its configuration will take into account the default configuration in addition to whatever (if anything) is configured for the specific one. For instance the default Nuxeo template now contains: <extension target= "org.nuxeo.ecm.core.transientstore.TransientStorageComponent" point= "store" > <store name= "default" class= "org.nuxeo.ecm.core.transientstore.keyvalueblob.KeyValueBlobTransientStore" > <targetMaxSizeMB> -1 </targetMaxSizeMB> <absoluteMaxSizeMB> -1 </absoluteMaxSizeMB> <firstLevelTTL> 240 </firstLevelTTL> <secondLevelTTL> 10 </secondLevelTTL> </store> <store name= "authorizationRequestStore" > <firstLevelTTL> 10 </firstLevelTTL> <secondLevelTTL> 0 </secondLevelTTL> </store> </extension> This shows that the implementation class needs to be defined only once in the default configuration, and other configurations can override some parameters if needed. As a further example, when the redis template is enabled and you exlicitly set nuxeo.transientstore.provider=redis  (which is not the default), then the following is added automatically and is enough to switch all transient stores to the new class (unless a specific non- default  transient store has defined its own class): <extension target= "org.nuxeo.ecm.core.transientstore.TransientStorageComponent" point= "store" > <store name= "default" class= "org.nuxeo.ecm.core.redis.contribs.RedisTransientStore" /> </extension> In addition, if a KeyValueBlobTransientStore is configured without an explicit <keyValueStore> or <blobProvider> , it will automatically use a key/value store or blob provider named transient_ followed by the transient store id.
    • Sprint:
      nxFG 10.10.4
    • Story Points:
      5

      Description

      When one requests a TransientStore that doesn't exist to the TransientStoreService, it currently fallbacks to the default one.

      However the expectation of the caller is still to see its own transient store without risk of key collision with what's in the default one.

      So like for NXP-26200 we must find a namespacing solution so that unknown transient stores use the same template as the default but with a different namespace.

      The namespace in turn has to be used to isolate everything, so in the case of the KeyValueBlobTransientStore it must be used to isolate the key/value store and the blob provider derived from the same original descriptor.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d