Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4128

Investigate NODE-4127 - Updates get lost while running multiple queries at once using Promise.all

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Not Needed

      NODE-4127 Description

      What problem are you facing?

      We found out that sometimes - when I run multiple update queries at the same time (on different collections), some of the queries get lost, meaning - only part of the queries actually run. It's hard to reproduce, and it took us some time to discover that this is indeed the issue. This time, we had two upsert queries running at the same time using `Promise.all`, for two different collections - the first collection used insertMany, and the other used bulkWrite with updateOne elements.
      We had overall 91124 rows to be inserted, and we split them into chunks of 5000 rows per upsert. At the end of the day, we saw that there are 86124 rows in the first collection and 91124 in the other one. It also happened to us in other places, where we didn't necessarily use insertMany and bulkWrites - but used regular updateMany queries.

      What driver and relevant dependency versions are you using?

      We are using mongo version 4.3.1, with Atlas M50 version 5.0

      Steps to reproduce?

      We don't know how to reproduce, it happened to us only a few times now. But it always happens when we have multiple update queries running at the same time, using Promise.all

            Assignee:
            Unassigned Unassigned
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: