Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config option for async_hooks support #524

Closed
puzpuzpuz opened this issue Apr 10, 2020 · 1 comment
Closed

Add config option for async_hooks support #524

puzpuzpuz opened this issue Apr 10, 2020 · 1 comment

Comments

@puzpuzpuz
Copy link
Contributor

puzpuzpuz commented Apr 10, 2020

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.

Potentially related with #529

@puzpuzpuz
Copy link
Contributor Author

Closing this one in favor of #529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants