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 #16278
FlakeIdGenerator advanced configuration #16278
Conversation
Can one of the admins verify this patch? |
run-lab-run |
Hi @lukasherman ! Thank you for your contribution. |
hazelcast/src/main/java/com/hazelcast/config/FlakeIdGeneratorConfig.java
Outdated
Show resolved
Hide resolved
hazelcast/src/main/java/com/hazelcast/config/FlakeIdGeneratorConfig.java
Outdated
Show resolved
Hide resolved
hazelcast/src/main/java/com/hazelcast/flakeidgen/impl/FlakeIdGeneratorProxy.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bitsTimestamp
is now calculated field to fill in all remaining bits up to 63. Resulting max value mask is moved out of the generator code.
@lukasherman Sorry for inconvenience,there is conflict related to generated files since another pr has changed the protocol, you are gonna need to rebase both pr's and regenerate the codecs. |
Only when more than 8 cpu's are detected a smart client will get 3+3 io threads. This will prevent performance regressions on smaller boxes.
…roperties: - epochStart - bitsTimestamp - bitsSequence - bitsNodeId - allowedFutureMillis Fixes #14150
added sanity checks removed no longer valid out of range check added unit test for custom configuration
removed idOffset and bitsTimestamp fields from configuration regenerated client protocol interfaces
…t-threadcount-for-fast-boxes IO threadcount for smart client only when enough cpu's
run-lab-run |
After client has authenticated, we were sending IsFailoverSupportedMessageTask (when newHazelcastFailoverClient is used) to query if members have the support. In this pr, we put this info to Authentication response to avoid second step. This was a different message task for backward compatibility reasons. When client has connected to a member that feature is not available yet, we wanted to get exception. Since there is no old server anymore, a second message task is not needed. related protocol change hazelcast/hazelcast-client-protocol#288 fixes #16336
It could happen that this connection is already closed and onConnectionClose() is called even before the authentication handling logic is executed. In this case, now we have a closed but registered connection in the client connection manager. We do a final check to remove this connection if needed. This check was already here before and removed with 3d897c2 because of wrong reasoning. Fixes #16288
Handle closed client connection after registration
@lukasherman sorry, the client protocol changed again. Can you rebase hazelcast/hazelcast-client-protocol#281 and regenerate classes for this PR? |
…roperties: - epochStart - bitsTimestamp - bitsSequence - bitsNodeId - allowedFutureMillis Fixes #14150
added sanity checks removed no longer valid out of range check added unit test for custom configuration
removed idOffset and bitsTimestamp fields from configuration regenerated client protocol interfaces
…hub.com/lukasherman/hazelcast into flakeidgenerator-advanced-configuration
run-lab-run |
Merged, thank you for the contribution @lukasherman and the reviews everyone! |
* FlakeIdGeneratorConfig extensions Core PR: hazelcast/hazelcast#16278 * Removed idOffset and bitsTimestamp fields from addFlakeIdGeneratorConfig Core PR: hazelcast/hazelcast#16278 * Add hot restart ops definitions for MC client * Add triggerPartitionAssingment message related to hazelcast/hazelcast#16375 * Encode PagingPredicate into protocol and the query response returns anchor list (#274) * Added the paging predicate to the paging predicate query responses so that the client can update its local anchor entry list. * Updated the Map `valuesWithPagingPredicate` to return only a list of values data instead of entries. * Updating the IMap paging predicate query codecs to serialize the PagingPredicate as a custom type and the responses return the updated anchor list. * Added source field to DistributedObject event. (#284) * Added `internal` field to DistributedObject request so that the ProxyManager internal registration to the distributed object listener can be differentiated from the user listeners. (#285) Co-authored-by: Andrey Pechkurov <37772591+puzpuzpuz@users.noreply.github.com> Co-authored-by: sancar <sancar@hazelcast.com> Co-authored-by: ihsan demir <ihsan@hazelcast.com>
Summary of breaking changes:
|
Externalizes currently hardcoded id generator properties.
Rationale:
With the upcoming User Defined Services SPI removal it will be no longer possible to implement custom FlakeIdGenerator implementation. This PR addresses shortcomings of the current implementation.
Fixes #14150