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

DBS Cache is not performing well on import

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: 9.1
    • Component/s: Core

      Description

      When creating document, the parents documents must be loaded.

      The DBS State cache should help, but if fails because it is fed with all new and loaded documents. The result on mass import is that it spend time on evicting old entries with a low hit rate.

      Possible fix:

      nuxeo-core/nuxeo-core-storage-dbs/src/main/java/org/nuxeo/ecm/core/storage/dbs/DBSCachingRepository.java
      
      @@ -192,7 +192,7 @@ public class DBSCachingRepository implements DBSRepository {
               // Read missing states from repository
               List<State> states = repository.readStates(idsToRetrieve);
               // Cache them
      -        states.forEach(this::putInCache);
               // Add previous cached one
               states.addAll(statesMap.values());
               // Sort them
      @@ -204,13 +204,13 @@ public class DBSCachingRepository implements DBSRepository {
           public void createState(State state) {
               repository.createState(state);
               // TODO check if it's relevant
      -        putInCache(state);
           }
       
           @Override
           public void createStates(List<State> states) {
               repository.createStates(states);
      -        states.forEach(this::putInCache);
           }
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: