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

Remove WanReplicationEvent wrapper for WAN events #15432

Merged
merged 2 commits into from Aug 8, 2019

Conversation

@mmedenjak
Copy link
Contributor

mmedenjak commented Aug 7, 2019

ReplicationEventObject has most of the data necessary to replicate WAN
events. The only thing missing was serviceName and the acknowledgeType.
The service name can be inferred from the ReplicationEventObject or can
be retrieved from a method which always returns the exact name.
Acknowledge type was not transferred between clusters but was only set
in the WanReplicationEvent when processing WAN events on the target
cluster to avoid passing one more method parameter.

By removing ReplicationEventObject, we now don't need to wrap WAN
events, saving up on heap space and also avoid serializing the wrapper,
which used up bytes for the factory ID, class ID and the full string
with the service name.

EE: hazelcast/hazelcast-enterprise#3111

Copy link
Contributor

blazember left a comment

LGTM, one minor on javadoc.

@@ -27,7 +28,7 @@
/**
* Processes a WAN replication event
*
* @param replicationEvent the event
* @param event the event

This comment has been minimized.

Copy link
@blazember

blazember Aug 8, 2019

Contributor

Minor: missing javadoc for the new argument.

Matko Medenjak added 2 commits Aug 7, 2019
ReplicationEventObject has most of the data necessary to replicate WAN
events. The only thing missing was serviceName and the acknowledgeType.
The service name can be inferred from the ReplicationEventObject or can
be retrieved from a method which always returns the exact name.
Acknowledge type was not transferred between clusters but was only set
in the WanReplicationEvent when processing WAN events on the target
cluster to avoid passing one more method parameter.

By removing ReplicationEventObject, we now don't need to wrap WAN
events, saving up on heap space and also avoid serializing the wrapper,
which used up bytes for the factory ID, class ID and the full string
with the service name.
Matko Medenjak
@mmedenjak mmedenjak force-pushed the mmedenjak:4.0-wan-publisher-spi-5 branch from ea9f8ed to 4c736a0 Aug 8, 2019
@mmedenjak mmedenjak merged commit 0dbb920 into hazelcast:master Aug 8, 2019
1 check passed
1 check passed
default Test PASSed.
Details
@mmedenjak mmedenjak deleted the mmedenjak:4.0-wan-publisher-spi-5 branch Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.