Uploaded image for project: 'Hibernate Search'
  1. Hibernate Search
  2. HSEARCH-2675

JGroupsBackendQueueProcessor doesn't switch from slave to master dynamically

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.6.1.Final, 5.7.0.Final, 5.8
    • Fix Version/s: 5.8.0.Beta2
    • Component/s: backend
    • Labels:
      None

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

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                yrodiere Yoann Rodière
                Reporter:
                yrodiere Yoann Rodière
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: