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

Possibility for data loss Async UIDs? #44

Closed
mike-kaufman opened this issue Mar 29, 2016 · 2 comments
Closed

Possibility for data loss Async UIDs? #44

mike-kaufman opened this issue Mar 29, 2016 · 2 comments

Comments

@mike-kaufman
Copy link
Contributor

I'm looking through the AsyncWrap code, and it appears that 64-bit signed int values are being cast to 32-bit signed int values here, here and here.

A few questions:

  1. Am I reading this correctly?
  2. Is there an alternative here? I don't immediately see how to seed a V8::Number with a 64-bit int.
  3. Is 32 bits enough "space" to maintain a monotonically increasing set of unique IDs? A process running continuously for 30 days, and consuming 1657 async events per second would exhaust this space & subsequent casts would overlap with previously issued IDs.

Thanks,

Mike

mike-kaufman referenced this issue in trevnorris/node Apr 14, 2016
So that each nextTick callback is treated as its own asynchronous event,
add a unique id to new TickObject instances. This is a preliminary for
allowing the async wrap callbacks to run with nextTick callbacks.
@trevnorris
Copy link

No it's not correct, and I know it's a problem. I have a fix in the pipeline.

@trevnorris
Copy link

Fixed here nodejs/node#7096

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

No branches or pull requests

3 participants