As AsyncLocalStorage core API was recently introduced in node v13.10.0 (and there will be a v12 backport soon), async_hooks module friendliness in various libraries should be a popular demand among Node.js community. Unfortunately, user-land queueing that we do in Automated Pipelining mode leads to context loss, so we should fix that.
The proposed solution is to add hazelcast.client.asynchooks.enabled config option (false by default, as the will be a small performance penalty when this option is enabled). Once this config option is enabled, we should enable async_hooks support in the underlying bluebird library. As all client operations return a bluebird Promise, this option should fix the issue.
Note: bluebird dependency has to be updated to v3.6.0+ to get asyncHooks config option. This task assumes new tests and a documentation section.
As
AsyncLocalStorage
core API was recently introduced in node v13.10.0 (and there will be a v12 backport soon),async_hooks
module friendliness in various libraries should be a popular demand among Node.js community. Unfortunately, user-land queueing that we do in Automated Pipelining mode leads to context loss, so we should fix that.The proposed solution is to add
hazelcast.client.asynchooks.enabled
config option (false
by default, as the will be a small performance penalty when this option is enabled). Once this config option is enabled, we should enableasync_hooks
support in the underlyingbluebird
library. As all client operations return abluebird
Promise, this option should fix the issue.Note:
bluebird
dependency has to be updated to v3.6.0+ to getasyncHooks
config option. This task assumes new tests and a documentation section.Potentially related with #529