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.

@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; }

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created April 6, 2017 at 10:14 AM
Updated May 11, 2017 at 7:35 AM
Resolved May 10, 2017 at 11:05 AM