We're updating the issue view to help you get more done. 

JGroupsBackendQueueProcessor doesn't switch from slave to master dynamically

Description

To be precise, the delegate backend is not created lazily when a node switches from slave to master. The delegate backend is currently only created in initialize(), which is only executed once for a given queue processor, and only if the node is a master when initialize() is called. Thus we probably have a NullPointerException when a node switches from slave to master dynamically.

1 2 3 4 5 6 7 8 9 10 11 12 13 @Override public void initialize(Properties props, WorkerBuildContext context, IndexManager indexManager) { // ... if ( selectionStrategy.isIndexOwnerLocal() ) { String backend = ConfigurationParseHelper.getString( jgroupsProperties, DELEGATE_BACKEND, "local" ); delegatedBackend = BackendFactory.createBackend( backend, indexManager, context, props ); } this.jgroupsProcessor = jgroupsProcessor; this.delegatedBackend = delegatedBackend; }

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Affects versions

5.7.0.Final
5.6.1.Final
5.8.1.Final

Priority

Major