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

UpdateReadACL should be run in async when serialization timeout is reached

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.9.4
    • Component/s: Core VCS

      Description

      The current code that updates the read acls does a sync to manage serialization.
      This sync has a timeout of 2s and the updated readACL is skipped in this case.

      // cluster mode.
                      if (repository.updateReadAclsLock.tryLock(2, TimeUnit.SECONDS)) {
                          try {
                              st.execute(sql);
                          } finally {
                              repository.updateReadAclsLock.unlock();
                          }
                      } else {
                          log.warn("Skipping updateReadAcls after 2s due to lock");
                      }
      

      This makes sense in most of the cases : since this means that other threads are actually already rebuilding ACLs.

      In some case, this assumption is false, and the timeout results in a not up to data ACL.

      We should :

      • make the Timeout configurable
      • send the updateReadAcl is async if timeout is reached.

      Tiry

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: