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

Indexing Gateway must provide a ThreadSafe mode

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Web API (REST or WS*)

      Description

      IndexingGateway web service uses a session key to manage authentication and Core Session lifecycle.
      This model is intended to be used by a threadsafe client that uses a sessionIs per thread.
      Based on support feedback, it looks like some of the external search engines using this API don't respect this rule and share the same sessionId between different threads.

      This results in a concurency in the CoreSession. Because there is no write operation, the only visible issue is about VCS Cache ThreadSafty.
      This can produce low level errors like :

        at org.apache.commons.collections.map.AbstractHashedMap.getEntry(AbstractHashedMap.java:434)
          at org.apache.commons.collections.map.AbstractReferenceMap.getEntry(AbstractReferenceMap.java:404)
          at org.apache.commons.collections.map.AbstractReferenceMap.get(AbstractReferenceMap.java:229)
          at org.nuxeo.ecm.core.storage.sql.CachingRowMapper.cacheGet(CachingRowMapper.java:172)
          at org.nuxeo.ecm.core.storage.sql.CachingRowMapper.read(CachingRowMapper.java:303)
          at org.nuxeo.ecm.core.storage.sql.PersistenceContext.getFromMapper(PersistenceContext.java:477)
          at org.nuxeo.ecm.core.storage.sql.PersistenceContext.getFromMapper(PersistenceContext.java:440)
          at org.nuxeo.ecm.core.storage.sql.PersistenceContext.get(PersistenceContext.java:430)
          at org.nuxeo.ecm.core.storage.sql.Node.getSimpleProperty(Node.java:161)
          at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.makeProperties(SQLSession.java:891)
          at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.makeProperty(SQLSession.java:855)
          at org.nuxeo.ecm.core.storage.sql.coremodel.SQLComplexProperty.getProperty(SQLComplexProperty.java:122)
          at org.nuxeo.ecm.core.storage.sql.coremodel.SQLComplexProperty.getPropertyValue(SQLComplexProperty.java:185)
          at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.readDocumentPart(SQLDocumentLive.java:150)
          at org.nuxeo.ecm.core.api.DocumentModelFactory.exportSchema(DocumentModelFactory.java:335)
          at org.nuxeo.ecm.core.api.AbstractSession.getDataModel(AbstractSession.java:2571)
      

      Because of that, we should provide :

      • a threadsafe flag that enforces sync at Nuxeo level : this will be useful for non threadsafe clients
      • an automatic transaction system (needed in 5.6)

        Attachments

          Activity

            People

            • Assignee:
              tdelprat Thierry Delprat
              Reporter:
              tdelprat Thierry Delprat
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: