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
FlakeIdGenerator advanced configuration #14150
Comments
The tricky part is to correctly handle possible id overflow. The current implementation simply grows without any bounds. |
Hi @lukasherman ! Yes, it's possible but currently it's not high-priority. We'll consider it. |
@mmedenjak are you interested in PR for that? |
@lukasherman yes, sure. Keep in mind that the master branch is now targeting Hazelcast 4.0 while the maintenance-3.x branch are patch releases for 3.12. Although it might be possible to introduce some smaller enhancements in patch releases, generally we refrain from it as we have various compatibility restraints (e.g. no serialization changes). |
OK, no problem. I have implemented the changes as a separate service into 3.1x. The code might need some review though. What is the schedule for 4.0? I need some planning first. |
Roughly, this fall. |
We are analyzing FlakeIdGenerator nodeId overflow behavior and would like to get your opinion whether the following code: hazelcast/hazelcast/src/main/java/com/hazelcast/flakeidgen/impl/FlakeIdGeneratorProxy.java Line 222 in 9e65699
could be replaced by getMemberIndex() :
It is not clear whether member index invariant applies to this use case. Thanks and regards |
FlakeIdGenerator advanced configuration. Externalizes the following properties: - epochStart - bitsTimestamp - bitsSequence - bitsNodeId - allowedFutureMillis Fixes #14150 Authored by: @lukasherman
Hello Hazelcast team,
is it possible to externalize
FlakeIdGeneratorProxy
constants, namelyEPOCH_START, BITS_TIMESTAMP, BITS_SEQUENCE, BITS_NODE_ID, ALLOWED_FUTURE_MILLIS
intoFlakeIdGeneratorConfig
?This would allow as to generate wider range of IDs for different use cases, such as those which rotate once per day, week, month, in exchange for shorter generated bit length.
With regards
Lukas Herman
The text was updated successfully, but these errors were encountered: