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

Improve query parse exception when running ES indexing

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: HOTFIX_10.10, 2021.x
    • Component/s: Elasticsearch

      Description

      We often see in the production logs:

      	org.nuxeo.ecm.core.query.QueryParseException: Syntax error: Invalid token <)> at offset 135
      	at org.nuxeo.ecm.core.query.sql.parser.parser.parseFailed(parser.java:519) ~[nuxeo-core-query-10.10-HF42.jar:?]
      	at org.nuxeo.ecm.core.query.sql.parser.parser.unrecovered_syntax_error(parser.java:510) ~[nuxeo-core-query-10.10-HF42.jar:?]
      	at java_cup.runtime.lr_parser.parse(lr_parser.java:601) ~[java-cup-0.11a.jar:?]
      	at org.nuxeo.ecm.core.query.sql.SQLQueryParser.parse(SQLQueryParser.java:43) ~[nuxeo-core-query-10.10-HF42.jar:?]
      	at org.nuxeo.ecm.core.query.sql.SQLQueryParser.parse(SQLQueryParser.java:52) ~[nuxeo-core-query-10.10-HF42.jar:?]
      	at org.nuxeo.ecm.core.storage.dbs.DBSSession.scroll(DBSSession.java:1793) ~[nuxeo-core-storage-dbs-10.10-HF51.jar:?]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_302]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_302]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_302]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_302]
      	at org.nuxeo.ecm.core.storage.dbs.DBSRepositoryBase$DBSSessionInvoker.invoke(DBSRepositoryBase.java:542) ~[nuxeo-core-storage-dbs-10.10-HF51.jar:?]
      	at com.sun.proxy.$Proxy84.scroll(Unknown Source) ~[?:?]
      	at org.nuxeo.ecm.core.api.AbstractSession.scroll(AbstractSession.java:1330) ~[nuxeo-core-10.10-HF51.jar:?]
      	at org.nuxeo.elasticsearch.work.ScrollingIndexingWorker.doWork(ScrollingIndexingWorker.java:81) ~[nuxeo-elasticsearch-core-10.10-HF50.jar:?]
      	at org.nuxeo.elasticsearch.work.BaseIndexingWorker.work(BaseIndexingWorker.java:48) ~[nuxeo-elasticsearch-core-10.10-HF50.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:493) ~[nuxeo-core-event-10.10-HF44.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:383) ~[nuxeo-core-event-10.10-HF44.jar:?]
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) ~[nuxeo-core-event-10.10-HF44.jar:?]
      	at org.nuxeo.ecm.core.work.WorkComputation.processRecord(WorkComputation.java:104) ~[nuxeo-core-event-10.10-HF44.jar:?]
      

      Probably due to a bad query passed in the JSF admin center (Re-indexing documents that match a NXQL query).

      I would be helpful to be aware of the actual NXQL query.

      There's a log but it's in DEBUG: https://github.com/nuxeo/nuxeo/blob/release-10.10-HF53/nuxeo-features/nuxeo-elasticsearch/nuxeo-elasticsearch-core/src/main/java/org/nuxeo/elasticsearch/work/ScrollingIndexingWorker.java#L76.

      Maybe we could try/catch the actual scroll call, log an ERROR and throw.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: