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

Annotation should use VCS relation graph instead of Jena

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5
    • Fix Version/s: 7.4
    • Component/s: Core VCS
    • Impact type:
      Configuration Change
    • Upgrade notes:
      Hide

      Relations are now by default stored as core relation objects with document type AnnotationRelation.

      To switch back to the old Jena storage, use this contribution:

      <require>org.nuxeo.ecm.platform.relations.jena</require>
      <require>org.nuxeo.ecm.annotations.graph</require>
      <extension target="org.nuxeo.ecm.platform.relations.services.RelationService"
      point="graphs">
      <graph name="annotations" type="jena">
      <option name="backend">sql</option>
      <option name="databaseType">${org.nuxeo.ecm.sql.jena.databaseType}</option>
      <option name="datasource">java:/nxrelations-default-jena</option>
      <namespaces>
      <namespace name="rdf">
      http://www.w3.org/1999/02/22-rdf-syntax-ns#
      </namespace>
      <namespace name="dcterms">
      http://purl.org/dc/terms/1.1/
      </namespace>
      <namespace name="nuxeo">
      http://www.nuxeo.org/document/uid/
      </namespace>
      </namespaces>
      </graph>
      </extension>

      Show
      Relations are now by default stored as core relation objects with document type AnnotationRelation. To switch back to the old Jena storage, use this contribution: <require>org.nuxeo.ecm.platform.relations.jena</require> <require>org.nuxeo.ecm.annotations.graph</require> <extension target="org.nuxeo.ecm.platform.relations.services.RelationService" point="graphs"> <graph name="annotations" type="jena"> <option name="backend">sql</option> <option name="databaseType">${org.nuxeo.ecm.sql.jena.databaseType}</option> <option name="datasource">java:/nxrelations-default-jena</option> <namespaces> <namespace name="rdf"> http://www.w3.org/1999/02/22-rdf-syntax-ns# </namespace> <namespace name="dcterms"> http://purl.org/dc/terms/1.1/ </namespace> <namespace name="nuxeo"> http://www.nuxeo.org/document/uid/ </namespace> </namespaces> </graph> </extension>
    • Sprint:
      Sprint RepoTeam 7.1-2

      Description

      Since NXP-7962 Relation are stored using VCS, except for the annotation.

      So we still have Jena requests when using annotation or when publishing a document, the VersionEventListener catch DOCUMENT_CHECKEDIN to copy the jena graph.

      Here is a stacktrace:

      com.hp.hpl.jena.db.DBConnection.getDriver(DBConnection.java:267)
      com.hp.hpl.jena.db.DBConnection.containsModel(DBConnection.java:195)
      org.nuxeo.ecm.platform.relations.jena.JenaGraph.openGraph(JenaGraph.java:245)
      org.nuxeo.ecm.platform.relations.jena.JenaGraph.openGraph(JenaGraph.java:182)
      org.nuxeo.ecm.platform.relations.jena.JenaGraph.query(JenaGraph.java:900)
      org.nuxeo.ecm.platform.annotations.service.AnnotationQuery.getAnnotationsForURIs(AnnotationQuery.java:68)
      org.nuxeo.ecm.platform.annotations.service.AnnotationsServiceImpl.queryAnnotations(AnnotationsServiceImpl.java:177)
      org.nuxeo.ecm.platform.annotations.proxy.AnnotationServiceProxy.queryAnnotations(AnnotationServiceProxy.java:190)
      org.nuxeo.ecm.platform.annotations.repository.service.DocumentVersionnedGraphManager.copyGraphFor(DocumentVersionnedGraphManager.java:102)
      org.nuxeo.ecm.platform.annotations.repository.service.DocumentVersionnedGraphManager.copyGraphFor(DocumentVersionnedGraphManager.java:91)
      org.nuxeo.ecm.platform.annotations.repository.service.DocumentVersionnedGraphManager.manage(DocumentVersionnedGraphManager.java:78)
      org.nuxeo.ecm.platform.annotations.repository.service.VersionEventListener.handleEvent(VersionEventListener.java:61)
      org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:164)
      

      A single JenaGraph.openGraph() submit around 80 SQL queries like:

      SELECT S.Subj, S.Prop, S.Obj FROM jena_sys_stmt S WHERE S.Subj = $1 AND S.Prop = $2 AND S.GraphID = $3 
      

      Even if they are very fast this high number of SQL queries affect the network latencies.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: