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

UnknownError from watching Change Stream with --verbose=v and large $match filter

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • Hide

      1. Start mongod of any version with --verbose flag. For example:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      mongod --dbpath xxx --logpath xxx --port 27017 --verbose=v
      

      2. Run the attached Go script. This Go script attempts to watch a change stream with a pipeline filtering 50,000 collections.

      The output of the repro script should show UnknownError.

      Show
      1. Start mongod of any version with --verbose flag . For example: Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml mongod --dbpath xxx --logpath xxx --port 27017 --verbose=v 2. Run the attached Go script. This Go script attempts to watch a change stream with a pipeline filtering 50,000 collections. The output of the repro script should show UnknownError.
    • QE 2023-06-26, QE 2023-07-10

      An UnknownError is returned from mongod started with verbosity level set explicitly and using Go driver as client instead of `BSONObjectTooLarge`. It is reproducible on v6.0.6 and other versions.

      We expect an error similar to

      (BSONObjectTooLarge) BSONObj size: 20078112 (0x1325E20) is invalid. Size must be between 0 and 16793600(16MB) First element: aggregate: 1
      

      But the actual error we see is

      (UnknownError) assertion src/mongo/util/hex.cpp:113
      

        1. main.go
          1 kB
        2. go.sum
          4 kB
        3. go.mod
          0.7 kB

            Assignee:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Reporter:
            jian.guan@mongodb.com Jian Guan
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: