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

Domain code was removed and callbacks no longer stay within a domain

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.5
    • Affects Version/s: 2.2.2
    • Component/s: None
    • Labels:

      In a recent commit all of the domain code was stripped out from mongodb-core. This means that domains are no longer being respected, which is a pretty huge problem due to the nature of the connection pool.

      I have attached an example file which showcases the example. If you switch the async.parallel to a series it will work just fine, but as soon as you start doing code in parallel (causing it to hit multiple pool connections), then you can see the domain code is a big mess.

      • In each console.log the i variable and the domain.active._num should align. They do not.
      • In each "in run" call you can see the i and domain.active._num properly line up.
      • In each "in cb" call, it should be within the same domain. It's a random chance whether it will be or not, and if it is in one, it's usually the wrong one.

      Is it the intention that domain support has been pulled from node driver? If it has, how are we supposed to remain in domains?

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            owenallenaz Owen Allen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: