Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-16375

CMISChangelog auditing enablement impacts CMIS connection if quantity records are excessive

    Details

    • Type: Service Pack Request
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 5.0.2, 4.2, 5.1
    • Fix Version/s: 5.0.4
    • Component/s: Auditing, CMIS
    • Labels:
    • Environment:
      MySQL, MariaDB

      Description

      Summary

      When CMISChangeLog auditing application is enabled and the quantity of records in audit table for that audit application is excessive (ex. millions), this delays and impacts the ability for any cmis connections to be created. If not causing cmis connections to fail from a timeout.

      Replication Steps

      • Implement CMISChangeLog auditing application
      • Generate millions of records
      • Use anything that connects via cmis ex. mobile app

      Expected Behaviour

      • cmis connection succeeds within reasonable time frame (under minute)

      Actual Behaviour

      • cmis connection can be delayed >10min or more dependent on the number or cmis changelog records in the audit table(s)

      Additional Information

      This seems to be caused by the following snippet in the CMISConnector class:

      ref: /root/projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java

          /**
           * Creates the repository info object.
           */
          private RepositoryInfo createRepositoryInfo(CmisVersion cmisVersion)
          {
              Descriptor currentDescriptor = descriptorService.getCurrentRepositoryDescriptor();
      
              // get change token
              boolean auditEnabled = auditService.isAuditEnabled(CMIS_CHANGELOG_AUDIT_APPLICATION, "/"
                      + CMIS_CHANGELOG_AUDIT_APPLICATION);
              String latestChangeLogToken = null;
      
              if (auditEnabled)
              {
                  EntryIdCallback auditQueryCallback = new EntryIdCallback(false);
                  AuditQueryParameters params = new AuditQueryParameters();
                  params.setApplicationName(CMIS_CHANGELOG_AUDIT_APPLICATION);
                  params.setForward(false);
                  auditService.auditQuery(auditQueryCallback, params, 1);
                  latestChangeLogToken = auditQueryCallback.getEntryId();
              }
        . . .
      

      The enabling of the CMISChangeLog audit application (i.e. alfresco-audit-cmis.xml) can generate copious records, as a result any cmis connection will be forced to wait for the snippet of code to return DB result set for all records and filter it down to the lastChangeLogToken.

      Workaround

      • Currently, the only work around is to either disable the CMISChangeLog audit application or to continue to delete/prune CMISChangelog audit records down such that the result set is kept smaller. This is not necessarily a acceptable option as dependent on the ingestion/update frequency of end users ex. 1000 changes/hour this would be a continual task.

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs
                  Reporter:
                  jsoria Jennie Soria
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 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 - 1 week, 3 days, 1 hour, 20 minutes
                    1w 3d 1h 20m

                      Structure Helper Panel