Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35379

com.mongodb.MongoQueryException: Query failed with error code 207 and error message 'Collection db.collection UUID differs from UUID on change stream operations' on server <host>

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Environment:
      staging, linux.
    • Query

      Hi team, 

      We integrated the change streams and using mongo-java-driver, however we are facing below issue, interestingly it is working fine for one collection and failing for second collection, we opened change stream on two collections.

      Server version: 3.6.5
      mongo-java-driver: 3.7.1

      com.mongodb.MongoQueryException: Query failed with error code 207 and error message 'Collection <db>.<collection> UUID differs from UUID on change stream operations' on server <mogos>:27017
      at com.mongodb.operation.QueryHelper.translateCommandException(QueryHelper.java:29)
      at com.mongodb.operation.QueryBatchCursor.getMore(QueryBatchCursor.java:229)
      at com.mongodb.operation.QueryBatchCursor.hasNext(QueryBatchCursor.java:115)
      at com.mongodb.operation.ChangeStreamBatchCursor$1.apply(ChangeStreamBatchCursor.java:58)
      at com.mongodb.operation.ChangeStreamBatchCursor$1.apply(ChangeStreamBatchCursor.java:55)
      at com.mongodb.operation.ChangeStreamBatchCursor.resumeableOperation(ChangeStreamBatchCursor.java:132)
      at com.mongodb.operation.ChangeStreamBatchCursor.hasNext(ChangeStreamBatchCursor.java:55)
      at com.mongodb.client.internal.MongoBatchCursorAdapter.hasNext(MongoBatchCursorAdapter.java:54)
      at .......
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            rajenderyes Rajender Shanigaram
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: