mdedetrich commented on PR #371: URL: https://github.com/apache/incubator-pekko/pull/371#issuecomment-1580348336
> I'm not an expert but any idea why the value is a `short`. If we used a type like `int` or `long`, the risk of collisions reduces. It has to be according to the standard, see https://datatracker.ietf.org/doc/html/rfc5452#section-4.3. The generated ID's fill a octet (i.e. 2 byte) range which in Java/Scala is a `Short`. Actually this new implementation is strictly better than the current one because the current one only used 1 byte range since it just incremented from `0` and `Short.MaxValue + 1` doesn't overflow into `Short.MinValue`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
