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

Tune the CMIS query during login to get platform information

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10-HF62, 2021.21
    • Component/s: Audit
    • Backlog priority:
      900
    • Upgrade notes:
      Hide

      The latestChangeLogToken returned by the CMIS endpoint is now searched on events of the past 2 weeks for performance reason.
      This limit can be tuned if needed using the following nuxeo.conf option:

      # Improve performance on getLatestLogId limiting events to the past 2 weeks, using elastic date syntax
      audit.elasticsearch.latestLogId.afterDate=now-14d/d
      
      Show
      The latestChangeLogToken returned by the CMIS endpoint is now searched on events of the past 2 weeks for performance reason. This limit can be tuned if needed using the following nuxeo.conf option: # Improve performance on getLatestLogId limiting events to the past 2 weeks, using elastic date syntax audit.elasticsearch.latestLogId.afterDate=now-14d/d
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #62

      Description

      When a user login from the UI there is a call to CMIS to get the server version and other information like the repository name and the latestChangeLogToken.

      The lastChangedToken is taken from the audit on elastic this translate to:

      curl  -H 'Content-Type: application/json' -XGET "<ELASTIC_NODE_URL>/nuxeo-audit/_search?typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&search_type=dfs_query_then_fetch&batched_reduce_size=512" -d '{"from":0,"size":1,"profile": true, "query":{"constant_score":{"filter":{"bool":{"must":[{"term":{"repositoryId":{"value":"default","boost":1.0}}},{"terms":{"eventId":["documentCreated","documentModified","documentRemoved"],"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"boost":1.0}},"sort":[{"id":{"order":"desc"}}]}'
      

      This query cannot scale, because it matches almost all log entries related to documents and it should be sorted,
      even if we return only one result there is an aggregation to estimate the total hits with a cost proportional to the number of matches.
      It has been observed that with a billion of log entries related to documents it takes a few seconds to complete.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.