[
https://jira.jboss.org/browse/ISPN-696?page=com.atlassian.jira.plugin.sys...
]
Paul Ferraro updated ISPN-696:
------------------------------
Workaround Description: (was: Regression was introduced in revision 2384.
Workaround involves rolling back ComponentRegistry.java to revision 2273.)
Workaround: (was: [Workaround Exists])
Description:
When a named cache is restarted, and fetchInMemoryState = true, the state transfer
initiated in StateTransferManager.start() causes a NPE, because the cache's
ComponentRegistry does not get reregistered with the GlobalComponentRegistry.
The NPE comes from InboundInvocationHandlerImpl:
public void applyState(String cacheName, InputStream i) throws StateTransferException
{
getStateTransferManager(cacheName).applyState(i);
}
private StateTransferManager getStateTransferManager(String cacheName) throws
StateTransferException {
ComponentRegistry cr = gcr.getNamedComponentRegistry(cacheName);
if (cr == null) {
return null;
}
return cr.getComponent(StateTransferManager.class);
}
A quick glance at ComponentRegistry indicates that the registry is registered with the
GlobalComponentRegistry during in the constructor and unregistered on stop(). Because of
this unbalanced registration, when the stopped component registry is restarted, it never
get re-registered with the GlobalComponentRegistry, hence the NPE during state transfer
the second time around.
This specific regression was introduced in revision 2384. Rolling back
ComponentRegistry.java to revision 2273 resolves the issue.
was:
When a named cache is restarted, and fetchInMemoryState = true, the state transfer
initiated in StateTransferManager.start() causes a NPE, because the cache's
ComponentRegistry does not get reregistered with the GlobalComponentRegistry.
The NPE comes from InboundInvocationHandlerImpl:
public void applyState(String cacheName, InputStream i) throws StateTransferException
{
getStateTransferManager(cacheName).applyState(i);
}
private StateTransferManager getStateTransferManager(String cacheName) throws
StateTransferException {
ComponentRegistry cr = gcr.getNamedComponentRegistry(cacheName);
if (cr == null) {
return null;
}
return cr.getComponent(StateTransferManager.class);
}
A quick glance at ComponentRegistry indicates that the registry is registered with the
GlobalComponentRegistry during in the constructor and unregistered on stop(). Because of
this unbalanced registration, when the stopped component registry is restarted, it never
get re-registered with the GlobalComponentRegistry, hence the NPE during state transfer
the second time around.
NPE during state transfer after restarting cache
------------------------------------------------
Key: ISPN-696
URL:
https://jira.jboss.org/browse/ISPN-696
Project: Infinispan
Issue Type: Bug
Components: State transfer
Affects Versions: 4.2.0.ALPHA2
Reporter: Paul Ferraro
Assignee: Manik Surtani
When a named cache is restarted, and fetchInMemoryState = true, the state transfer
initiated in StateTransferManager.start() causes a NPE, because the cache's
ComponentRegistry does not get reregistered with the GlobalComponentRegistry.
The NPE comes from InboundInvocationHandlerImpl:
public void applyState(String cacheName, InputStream i) throws StateTransferException
{
getStateTransferManager(cacheName).applyState(i);
}
private StateTransferManager getStateTransferManager(String cacheName) throws
StateTransferException {
ComponentRegistry cr = gcr.getNamedComponentRegistry(cacheName);
if (cr == null) {
return null;
}
return cr.getComponent(StateTransferManager.class);
}
A quick glance at ComponentRegistry indicates that the registry is registered with the
GlobalComponentRegistry during in the constructor and unregistered on stop(). Because of
this unbalanced registration, when the stopped component registry is restarted, it never
get re-registered with the GlobalComponentRegistry, hence the NPE during state transfer
the second time around.
This specific regression was introduced in revision 2384. Rolling back
ComponentRegistry.java to revision 2273 resolves the issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira