Change stream with update lookup can trip server assertion

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: 8.0.24
    • Component/s: Change streams
    • None
    • Query Execution
    • ALL
    • Hide

      This is not totally reliable because I think the bug is some sort of race condition, but:

      • open a change stream with fullDocument: updateLookup and iterate it
      • update documents in a collection (note that they must be updates: inserts and replaces do not need to do a lookup for the full document)
      • drop that collection
      Show
      This is not totally reliable because I think the bug is some sort of race condition, but: open a change stream with fullDocument: updateLookup and iterate it update documents in a collection (note that they must be updates: inserts and replaces do not need to do a lookup for the full document) drop that collection
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We have a test in the mongosync codebase that sometimes (extremely rarely) trips an assertion in the server. The test opens a change stream with fullDocument: updateLookup, updates some documents in a collection, then drops that collection.

      Sometimes in CI this test fails because the change stream trips a tassert in the server, with an error like:

      (Location8884401) Executor error during getMore :: caused by :: Missing _id index on non-clustered collection.
      

      This seems like a bug in the express engine: it seems like it shouldn't be possible to observer a state where a collection exists but does not have an _id index. I would expect the change stream to do what it usually does in the case of a dropped collection, which is simply to return an empty full document and not an error.

      (I'm filing this against 8.0.24 because that's the version where I've seen it, but it may also be relevant in older versions.)

            Assignee:
            Denis Grebennicov
            Reporter:
            Michael McClimon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: