Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-1334

Add HDC Diagnostics in JCR Query executions and JCR Login

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 3.2.0
    • None

    Description

      Woonsan's question:

      One question (or suggestion) to you by the way:
      Currently, HST has HDC monitoring code in HstQueryImpl#execute().
      How about moving this to somewhere in hippo repository module? (I'm not sure where to put right yet though.)
      Then, that jcr query monitoring can be shared between hst and cms module.
      The problem in cms application is that each plugin uses raw jcr queries without any intermediate class like HstQuery. So, this move could help the situation in cms especially.

      Ard's suggestion:

      Indeed I think moving the HDC monitoring from HstQueryImpl#execute to repository is fine. I think you need to add it in a couple of places in the repository because I think depending on the type of query, different object is used. I am not sure whether below (1) results also in a call on (2) or (3) (worst case double Task logger but (1) is for OQM which AFAIK we dont use any way) but I think you can add it in the repository to
      1) org.hippoecm.repository.jackrabbit.HippoSearchManager.HippoQueryObjectModelImpl#execute
      2) org.hippoecm.repository.query.lucene.ServicingSearchIndex#executeQuery(org.apache.jackrabbit.core.SessionImpl, org.apache.jackrabbit.core.query.lucene.MultiColumnQuery, org.apache.jackrabbit.core.query.lucene.Ordering[], long)
      3) org.hippoecm.repository.query.lucene.ServicingSearchIndex#executeQuery(org.apache.jackrabbit.core.SessionImpl, org.apache.jackrabbit.core.query.lucene.AbstractQueryImpl, org.apache.lucene.search.Query, org.apache.jackrabbit.spi.Path[], boolean[], java.lang.String[], long)
      Where you could also add a Task logging is in:
      org.hippoecm.repository.query.lucene.util.CachingMultiReaderQueryFilter#createDocIdSet
      This one is sometimes invoked as a result of a query (when there is not yet a cached filter). The interesting part in 'createDocIdSet' is of course when it takes long. Just log in the Task the same as the current message:
      log.info("For userId '{}', creating CachingMultiReaderQueryFilter doc id set took {} ms.", userId,
      String.valueOf(System.currentTimeMillis() - start));
      (dont log the authorization query itself, that one is way too long)

      If this is done in the repository level, we will probably need to remove HDC monitoring code in HstQueryImpl#execute() method with a separate HSTTWO jira ticket.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: