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

Do not store map store instance in MapStoreConfig #15224

Merged

Conversation

@vbekiaris
Copy link
Contributor

vbekiaris commented Jun 26, 2019

Reasoning: the MapStoreConfig may have been added dynamically, so
storing the actual map store instance in MapStoreConfig#implementation
may result in failures as members join the cluster such as:

  • failure to serialize the MapStoreConfig, in case the map store class
    is not serializable
  • failure to deserialize the MapStoreConfig on the joining member side
    if the class is only resolvable over user code deployment, as the
    deserialization occurs within DynamicConfigPreJoinOperation
    deserialization, before members list is updated

Additionally, the behaviour of storing the actual instance
back in the implementation field is specific to MapStoreConfig and
differs from any other similar config's behaviour
(eg RingbufferStoreConfig).

Reasoning: the MapStoreConfig may have been added dynamically, so
storing the actual map store instance in MapStoreConfig#implementation
may result in failures as members join the cluster such as:
 - failure to serialize the MapStoreConfig, in case the map store class
 is not serializable
 - failure to deserialize the MapStoreConfig on the joining member side
 if the class is only resolvable over user code deployment, as the
 deserialization occurs within DynamicConfigPreJoinOperation
 deserialization, before members list is updated

Additionally, the behaviour of storing the actual instance
back in the implementation field is specific to MapStoreConfig and
differs from any other similar config's behaviour
(eg RingbufferStoreConfig).
@vbekiaris vbekiaris force-pushed the vbekiaris:fixes/4.0/dynconfig-usercodedeployment branch from c54bb45 to 2e5cc53 Jun 27, 2019
@vbekiaris

This comment has been minimized.

Copy link
Contributor Author

vbekiaris commented Jul 3, 2019

@mustafaiman @ahmetmircik thanks for the reviews

@vbekiaris vbekiaris merged commit 03fefd3 into hazelcast:master Jul 3, 2019
1 check passed
1 check passed
default Test PASSed.
Details
vbekiaris added a commit to vbekiaris/hazelcast that referenced this pull request Jul 8, 2019
vbekiaris added a commit to vbekiaris/hazelcast that referenced this pull request Jul 8, 2019
vbekiaris added a commit that referenced this pull request Jul 11, 2019
The test used to rely on erroneous behaviour fixed by #15224
vbekiaris added a commit that referenced this pull request Jul 14, 2019
The test used to rely on erroneous behaviour fixed by #15224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.