-
Notifications
You must be signed in to change notification settings - Fork 629
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
ISPN-9127 Component registry #6232
ISPN-9127 Component registry #6232
Conversation
7b52cea
to
93f3743
Compare
Quite a few test failures - also the point of this refactor is to ensure that all components are started before operations can begin? Is it not as simple as ensuring the start order is changed to not allow remote commands until other components are started? |
49b6795
to
23c91d8
Compare
Needs rebase |
6f5cc8d
to
62e2db5
Compare
I still have trouble starting servers. Not getting exception in the counters anymore, but one of the nodes get suspected and the state transfer times out preventing the cluster to form. I am gathering some logs... |
bc8d946
to
4b173de
Compare
595c00e
to
39ee2d2
Compare
39ee2d2
to
e0dcb51
Compare
Should be ok to integrate now, it passed the spark connector tests. |
And CI says it's green ! |
e0dcb51
to
c4f3cf6
Compare
Tested again today and the deadlock is not happening anymore. Also, the NPE starting the server is related to other issue https://issues.jboss.org/browse/ISPN-9563, so LGTM |
c4f3cf6
to
54470b1
Compare
db50ad9
to
8c58bb1
Compare
8c58bb1
to
1432beb
Compare
Let's wait for CI |
CI timed out on some query tests: A few of those were thrown:
and the one that crashed:
|
needs rebase again |
The core test timeouts are almost certainly related to the JGroups upgrade. I have reproduced them with trace logging and the problem is that JGroups isn't able to install a proper view after the coordinator leaves. Unfortunately I can't reproduce it with trace enabled for org.jgroups.protocols.UDP, so I'm not sure where the view message is lost.
The query ones are possibly related, I'm still investigating. |
|
1432beb
to
e5d95e9
Compare
Updated! I thought I'd fix the |
Introduce BasicComponentRegistry, which handles dependency injection but doesn't have any logic specific to caches or managers. Each component has its own lifecycle status, and starting a component also starts its dependencies. Components can start in parallel. ComponentRegistry and GlobalComponentRegistry still need to maintain their own lifecycle status, but it is now possible to start a cache before all the global components have finished starting.
Also fix NullPointerException when stopping a cache with indexing disabled.
e5d95e9
to
0c423f1
Compare
Merged, thanks @danberindei ! |
https://issues.jboss.org/browse/ISPN-9127
I extracted the main functionality of the component registries in a
BasicComponentRegistry
interface, implemented byBasicComponentRegistryImpl
.ComponentRef<T>
fields or injection method parameters can be used as lazy dependencies to break dependency cycles. Lazy dependencies are only created and wired when thewired()
method is called.registerComponent()
doesn't overwrite existing components.replaceComponent()
replaces existing components, but it is intended only for tests.getComponent()
andregisterComponent()
return aComponentRef<T>
, and the component is always at least wired (all the dependencies have been injected). Userunning()
to get the actual instance, orwired()
iffrunning()
would create a cycle.I also changed the behaviour of
[Global]ComponentRegistry
a bit:getComponent()
always tries to create and start the component (skips the start if the registry is only INSTANTIATED)registerComponent()
doesn't overwrite existing components