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

Optimize Elasticsearch reindexing when a document is checked in

    XMLWordPrintable

    Details

    • Release Notes Summary:
      The number of versions reindexed at check-in is optimized.
    • Tags:
    • Backlog priority:
      700

      Description

      When a document is checked in, the document and all its versions are reindexed in Elasticsearch.

      https://github.com/nuxeo/nuxeo/blob/9.10/nuxeo-features/nuxeo-elasticsearch/nuxeo-elasticsearch-core/src/main/java/org/nuxeo/elasticsearch/commands/IndexingCommandsStacker.java#L147

      The current implementation is not optimized because it was difficult at that time to retrieve the previous last version and last major version. But the consequence is a potential problem when a document has many versions : the Elasticsearch request to index the document is huge and the build of the ES request could time out

      [org.nuxeo.ecm.core.work.AbstractWork] Exception during work: IndexingWorker(306e0e21-91bb-45c0-9f5e-274a6ab94c83, , Progress(?%, ?/0), null)
      org.nuxeo.runtime.transaction.TransactionRuntimeException: Transaction has timed out
          at org.nuxeo.runtime.transaction.TransactionHelper.checkTransactionTimeout(TransactionHelper.java:223)
          at org.nuxeo.ecm.core.api.local.LocalSession.getSession(LocalSession.java:107)
          at org.nuxeo.ecm.core.api.AbstractSession.resolveReference(AbstractSession.java:338)
          at org.nuxeo.ecm.core.api.AbstractSession.exists(AbstractSession.java:844)
          at org.nuxeo.elasticsearch.commands.IndexingCommand.getTargetDocument(IndexingCommand.java:162)
          at org.nuxeo.elasticsearch.core.ElasticSearchIndexingImpl.buildEsIndexingRequest(ElasticSearchIndexingImpl.java:408) 

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 4 hours, 15 minutes
                4h 15m