[CONTROLLER-995] Clustering : StatisticsManager throws NPE when running single node integration tests Created: 05/Nov/14 Updated: 25/Jul/23 Resolved: 14/Nov/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | mdsal |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Moiz Raja | Assignee: | Moiz Raja |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 2317 |
| Description |
|
2014-10-31 11:29:44,687 | ERROR | -notification-21 | NotifyTask | 140 - org.opendaylight.controller.sal-binding-broker-impl - 1.2.0.SNAPSHOT | Unhandled exception thrown by listener: org.opendaylight.controller.md.statistics.manager.impl.StatListenCommitFlow$$Broker$ListenerInvoker@5d22f281 org.opendaylight.controller.md.statistics.manager.impl.StatListenCommitFlow.onFlowsStatisticsUpdate(StatListenCommitFlow.java:172)[151:org.opendaylight.controller.md.statistics-manager:1.2.0.SNAPSHOT] |
| Comments |
| Comment by Moiz Raja [ 05/Nov/14 ] |
|
protected boolean isExpectedStatistics(final TransactionId transId, final NodeId nodeId) { catch (InterruptedException | ExecutionException | TimeoutException e) {
It seems to be that StatisticsManagerImpl close is called at some point and that results in things getting messed up thenceforth. |
| Comment by Moiz Raja [ 05/Nov/14 ] |
|
My initial analysis suggests that this may be an issue with StatisticsManager not unregistering for notifications properly. This can happen when the configuration is changed (config sub-system). For example when we switch from in-memory to clustered datastore the databroker gets rewired which results in all apps that use the databroker getting rewired. At that time the statistics manager's close will be called. The statistics manager should unregister from all notifications at this point. If it does not then it may receive notifications and since close sets the variables to null results in an NPE. |
| Comment by Moiz Raja [ 05/Nov/14 ] |
|
StatsManagerImpl#close does call close on all the "*Comiter" and "*Registration" class instances. That should have unregistered the notifications ??? |
| Comment by Moiz Raja [ 06/Nov/14 ] |
| Comment by Moiz Raja [ 14/Nov/14 ] |
|
Merged to both master and stable/helium |