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

Random transaction errors after MongoDB upgrade 4.4.1=>4.4.7

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.7.3, 4.1.4
    • Affects Version/s: None
    • Component/s: None
    • 2
    • Not Needed

      After MongoDB upgrade from v4.4.1 to v4.4.7 the application terminates with protocol-level errors in random places. With v4.4.1 everything has been working seamlessly for months. Tried MongoDB v5.0.1 - the result is the same.

      mongodb driver packages v4.0.1 and v3.6.10 behave identically.

      TypeError: Cannot read property 'low' of undefined
       at Function.Long.fromValue (..\node_modules\bson\lib\long.js:249:34)
       at Timestamp.Long.compare (..\node_modules\bson\lib\long.js:293:26)
       at Timestamp.Long.comp (..\node_modules\bson\lib\long.js:312:21)
       at Timestamp.Long.greaterThan (..\bson\lib\long.js:469:21)
       at mergeBatchResults (..\node_modules\mongodb\lib\bulk\common.js:305:31)
       at resultHandler (..\mongodb\lib\bulk\common.js:383:29)
       at ..\node_modules\mongodb\lib\utils.js:523:9
       at ..\node_modules\mongodb\lib\operations\execute_operation.js:49:17
       at ..\node_modules\mongodb\lib\cmap\connection_pool.js:204:25
       at handleOperationResult (..\node_modules\mongodb\lib\sdam\server.js:298:9)
      

      Connection settings:

      promoteValues: true,
      promoteLongs: false,
      useUnifiedTopology: true,
      directConnection: true,
      maxPoolSize: 30,
      minPoolSize: 2
      

      Sample code:

      db.withSession(async session => {
                      await session.withTransaction(()=>{
                              //insert several thousand documents and create one collection here
                      })
                  })
      

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            kreig Vyacheslav Stroy
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: