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

Support for force-init and publish of uninitialized proxies #15986

Merged

Conversation

@vojtechtoman
Copy link
Contributor

vojtechtoman commented Nov 12, 2019

Added functionality to ProxyServiceImpl to force-initialize
and publish all uninitialized proxy objects.

Relates to hazelcast/hazelcast-enterprise#3325
Required for hazelcast/hazelcast-enterprise#3343 (EE)

Added functionality to ProxyServiceImpl to force-initialize
and publish all uninitialized proxy objects.

Relates to https://github.com/hazelcast/hazelcast-enterprise/issues/3325
@mmedenjak mmedenjak added this to the 3.12.5 milestone Nov 15, 2019
DistributedObjectFuture future = entry.getValue();
if (!future.isSetAndInitialized()) {
extractDistributedObject(future);
publish(new DistributedObjectEventPacket(CREATED, serviceName, entry.getKey()));

This comment has been minimized.

Copy link
@mmedenjak

mmedenjak Nov 15, 2019

Contributor

One thing comes to mind - I see the ProxyRegistry#extractDistributedObject method may return null in case it wasn't able to retrieve the proxy. Maybe we can skip publication in this case?

This comment has been minimized.

Copy link
@mdogan

mdogan Nov 18, 2019

Member

In ProxyRegistry.doCreateProxy(..) , if initialization fails, future is removed from proxies map and no event is published.
Additionally, ProxyRegistry.publish(event) publishes event only to remote members. There's an additional eventService.executeEventCallback(callback) call for local.

This comment has been minimized.

Copy link
@vojtechtoman

vojtechtoman Nov 19, 2019

Author Contributor

I have pushed another commit that changes the implementation so that it publishes the event only if proxy initialization succeeded. If proxy initialization failed, the future is removed from the registry, similar to doCreateProxy(). I have also added explanation to the method documentation of why only remote events are fired.

@mmedenjak mmedenjak requested a review from mdogan Nov 15, 2019
Remove the proxy future if proxy initialization failed.

Extend method documentation to make it clear why only
remote events are published.
@mdogan
mdogan approved these changes Nov 21, 2019
@vojtechtoman

This comment has been minimized.

Copy link
Contributor Author

vojtechtoman commented Nov 26, 2019

run-lab-run

@vojtechtoman vojtechtoman merged commit 15b775e into hazelcast:maintenance-3.x Nov 26, 2019
1 check failed
1 check failed
default Test `FAIL`ed. http://jenkins.hazelcast.com/job/Hazelcast-pr-builder/4681/
Details
@vojtechtoman

This comment has been minimized.

Copy link
Contributor Author

vojtechtoman commented Nov 26, 2019

Merged/closed with an unrelated test failure.

vojtechtoman added a commit to vojtechtoman/hazelcast that referenced this pull request Nov 26, 2019
…t#15986)

Support for force-init and publish of uninitialized proxies

Added functionality to ProxyServiceImpl to force-initialize
and publish all uninitialized proxy objects. Remove the proxy
future if proxy initialization failed.

Relates to hazelcast/hazelcast-enterprise#3325
vojtechtoman added a commit that referenced this pull request Nov 29, 2019
…16116)

Support for force-init and publish of uninitialized proxies

Added functionality to ProxyServiceImpl to force-initialize
and publish all uninitialized proxy objects. Remove the proxy
future if proxy initialization failed.

Relates to hazelcast/hazelcast-enterprise#3325
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.