Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Aeron - choose short virtual peer id using a hash of the virtual peer id #250

Closed
lbradstreet opened this issue Jul 18, 2015 · 1 comment
Closed
Assignees

Comments

@lbradstreet
Copy link
Member

The Aeron messaging component chooses the short int dispatch id in a consistent way by choosing the next value from a set of shorts. This means that shorts may be quickly reused when they are deallocated. A better solution would be to choose these via a hash of the id, mod to the range of a short. If the short is used by another vpeer on that instance, rehash the hashed id, and mod again.

This reduces chance that a new vpeer will receive messages from a peer that was just shutdown. Note, this was also a problem with the port allocation scheme, though it probably wouldn't have ever happened in practice.

@lbradstreet
Copy link
Member Author

Closed by @dignati in #280

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

No branches or pull requests

1 participant