Class DefaultServerIndexRepairService

java.lang.Object
com.atlassian.jira.index.ha.DefaultServerIndexRepairService

public class DefaultServerIndexRepairService extends Object
  • Field Details

    • SYSTEM_PROPERTY_PERIOD_SECONDS

      public static final String SYSTEM_PROPERTY_PERIOD_SECONDS
      See Also:
    • DEFAULT_PERIOD_SECONDS

      public static final long DEFAULT_PERIOD_SECONDS
      See Also:
    • SYSTEM_PROPERTY_MAX_TIMESPAN_SECONDS

      public static final String SYSTEM_PROPERTY_MAX_TIMESPAN_SECONDS
      See Also:
    • DEFAULT_MAX_TIMESPAN_SECONDS

      public static final long DEFAULT_MAX_TIMESPAN_SECONDS
    • SYSTEM_PROPERTY_SAFETY_MARGIN_SECONDS

      public static final String SYSTEM_PROPERTY_SAFETY_MARGIN_SECONDS
      The repair job replays all de-index operations since the lastRun. However, we need to take into account possible delays. A (relatively small) delay can happen between when we calculate the range in deindexRecentOperations() and when we actually execute IndexRecoveryManager.deindexEntitiesDeletedInTheLast(Duration, TaskProgressSink). The safety margin needs to be long enough for the next repair job to "reach" the deletion operation of the slowly indexed issue. Therefore, the second constituent of the safety margin needs to be as long as we allow the issue document building to be. The corresponding mechanism in DC is based on DefaultNodeReindexService replaying local node operations after a fixed delay. The delay is configured in DefaultNodeReindexService#delayInSeconds and is tied to LocalQConfig.putTTLMillis().
      See Also:
    • DEFAULT_SAFETY_MARGIN_SECONDS

      public static final long DEFAULT_SAFETY_MARGIN_SECONDS
      See SYSTEM_PROPERTY_SAFETY_MARGIN_SECONDS for an explanation of these two constituents of the safety margin.
      See Also:
  • Constructor Details

    • DefaultServerIndexRepairService

      public DefaultServerIndexRepairService(JiraProperties jiraProperties, com.atlassian.event.api.EventPublisher eventPublisher, IndexRecoveryManager indexRecoveryManager)
  • Method Details

    • onPluginFrameworkStarted

      @EventListener public void onPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event)
    • onIndexingShutdownEvent

      @EventListener public void onIndexingShutdownEvent(IndexingShutdownEvent event)
    • onImportStartedEvent

      @EventListener public void onImportStartedEvent(ImportStartedEvent event)
    • onImportCompletedEvent

      @EventListener public void onImportCompletedEvent(ImportCompletedEvent event)
    • pause

      public void pause()
    • start

      public void start()
    • onPluginFrameworkShutdown

      @EventListener public void onPluginFrameworkShutdown(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event)
    • shutdown

      public void shutdown()