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

Fix MongoDB usage with idType sequenceHexRandomized

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 11.1
    • Fix Version/s: 11.2, 2021.0
    • Component/s: Core MongoDB
    • Tags:
    • Team:
      FG
    • Sprint:
      nxFG 11.1.13
    • Story Points:
      2

      Description

      With <idType>sequenceHexRandomized</idType>, there are issues doing scrolls:

      org.nuxeo.ecm.core.api.NuxeoException: Work failed after 1 retry, class=class org.nuxeo.elasticsearch.work.ScrollingIndexingWorker id=10721511597708.1711867698 category=elasticSearchIndexing title=Elasticsearch scrolling indexer: SELECT ecm:uuid FROM Document WHERE ecm:ancestorId = '1c13f2cb61dbdaa9', processed 0
           at org.nuxeo.ecm.core.work.AbstractWork.workFailed(AbstractWork.java:476) ~[nuxeo-core-event-11.2.11.jar:?]
           at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:398) ~[nuxeo-core-event-11.2.11.jar:?]
           ...
      Caused by: java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader 'bootstrap')
           at org.nuxeo.ecm.core.storage.mongodb.MongoDBCursorService.lambda$new$0(MongoDBCursorService.java:38) ~[nuxeo-core-storage-mongodb-11.2.11.jar:?]
           at org.nuxeo.ecm.core.api.CursorService.scroll(CursorService.java:149) ~[nuxeo-core-api-11.2.11.jar:?]
           at org.nuxeo.ecm.core.storage.mongodb.MongoDBConnection.scroll(MongoDBConnection.java:843) ~[nuxeo-core-storage-mongodb-11.2.11.jar:?]
           at org.nuxeo.ecm.core.storage.mongodb.MongoDBConnection.scroll(MongoDBConnection.java:836) ~[nuxeo-core-storage-mongodb-11.2.11.jar:?]
           at org.nuxeo.ecm.core.storage.dbs.DBSCachingConnection.scroll(DBSCachingConnection.java:357) ~[nuxeo-core-storage-dbs-11.2.11.jar:?]
           at org.nuxeo.ecm.core.storage.dbs.DBSTransactionState.scroll(DBSTransactionState.java:764) ~[nuxeo-core-storage-dbs-11.2.11.jar:?]
           at org.nuxeo.ecm.core.storage.dbs.DBSSession.scroll(DBSSession.java:1919) ~[nuxeo-core-storage-dbs-11.2.11.jar:?]
           at org.nuxeo.ecm.core.api.AbstractSession.scroll(AbstractSession.java:1377) ~[nuxeo-core-11.2.11.jar:?]
      

      This is due to a refactoring in NXP-26690 where MongoDBCursorService lost some back-conversion from bson to Nuxeo format for returned ids.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 3 hours
                  3h