0

Node mongodb native driver version 3.7 provides a domainsEnabled connection option (as described in 3.7 documentation)

Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit

However, I don't find a similar option in 4.0 release

Why has it been removed? Is there any workaround to have the same functionality with 4.0?

Thanks!

fgalan
  • 11,732
  • 9
  • 46
  • 89
  • Maybe useful https://jira.mongodb.org/browse/NODE-1974 – fgalan Jun 23 '22 at 21:31
  • Maybe useful https://github.com/mongodb/node-mongodb-native/pull/2603 – fgalan Jun 23 '22 at 21:31
  • 1
    Apparently they took nodejs domain deprecation too optimistically. 14 major versions later it's still deprecated... – Alex Blex Jun 23 '22 at 21:35
  • Thanks for your feedback Alex Blex. However, as far as I understand nodejs domains are not yet deprecated, but in "pending deprecation" status as far as I understand by https://stackoverflow.com/questions/49494211/replacement-for-domain-in-nodejs and https://nodejs.org/api/domain.html – fgalan Jun 24 '22 at 07:46
  • ah, indeed, I missed the small print. So it's been in the "pending deprecation" for some 7 years now... one says "There is nothing so permanent as a temporary fix". May be raise a feature request to revert the change. – Alex Blex Jun 24 '22 at 08:01

0 Answers0