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

Missing expected error field "errmsg" when inserting an unordered bulk of GeoJSON

    • ALL

      When inserting an unordered bulk of GeoJSON that are auto-intersecting, some of them (8609 of 10000) have an error instance that is containing an empty `errmsg` field.

      The database should have `2dsphere` geometry index activated.

      According to the documentation, every BulkWriteError must contain a message.

      We further did the check on MongoDB 3.6.16, 4.0.13, 4.2.2 with the same result.

      We checked on the Node.js client library 3.3.0 and 3.4.0.

      To be sure if this behavior is related to the Node.js binding or from the MongoDB server, we used Wireshark to see how many full error message we got against empty ones. And we found the same amount of incomplete error message as from the Node.js client library 3.3.0.

      We suspect there is some size limit to the number of error messages, because the amount of well-formed error message decrease as we insert a bigger GeoJSON, and vice-versa.

      The missing information on why the geometry is invalid is useful as we do processing to alter the geometry to get it compliant for MongoDB.

      The fact is we cannot do that in this case.

      We wrote a code example that highlights the issue: https://github.com/sogelink/MongoDB-invalid-errmsg-test.

      The README.md describes four commands needed to: set up an empty MongoDB via Docker, set the geometry 2dsphere index, then run the test.

      Feel free to ask for any further information.

            Assignee:
            edwin.zhou@mongodb.com Edwin Zhou
            Reporter:
            raphael.cazenave-leveque@sogelink.fr Raphaël Cazenave Leveque
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: