public class DefaultServerIndexRepairService extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_MAX_TIMESPAN_SECONDS |
static long |
DEFAULT_PERIOD_SECONDS |
static long |
DEFAULT_SAFETY_MARGIN_SECONDS
See
SYSTEM_PROPERTY_SAFETY_MARGIN_SECONDS for an explanation of these two constituents of the safety margin. |
static String |
SYSTEM_PROPERTY_MAX_TIMESPAN_SECONDS |
static String |
SYSTEM_PROPERTY_PERIOD_SECONDS |
static String |
SYSTEM_PROPERTY_SAFETY_MARGIN_SECONDS
The repair job replays all de-index operations since the
lastRun . |
Constructor and Description |
---|
DefaultServerIndexRepairService(JiraProperties jiraProperties,
com.atlassian.event.api.EventPublisher eventPublisher,
IndexRecoveryManager indexRecoveryManager) |
Modifier and Type | Method and Description |
---|---|
void |
onImportCompletedEvent(ImportCompletedEvent event) |
void |
onImportStartedEvent(ImportStartedEvent event) |
void |
onIndexingShutdownEvent(IndexingShutdownEvent event) |
void |
onPluginFrameworkShutdown(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event) |
void |
onPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event) |
void |
pause() |
void |
shutdown() |
void |
start() |
public static final String SYSTEM_PROPERTY_PERIOD_SECONDS
public static final long DEFAULT_PERIOD_SECONDS
public static final String SYSTEM_PROPERTY_MAX_TIMESPAN_SECONDS
public static final long DEFAULT_MAX_TIMESPAN_SECONDS
public static final String SYSTEM_PROPERTY_SAFETY_MARGIN_SECONDS
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()
.public static final long DEFAULT_SAFETY_MARGIN_SECONDS
SYSTEM_PROPERTY_SAFETY_MARGIN_SECONDS
for an explanation of these two constituents of the safety margin.public DefaultServerIndexRepairService(JiraProperties jiraProperties, com.atlassian.event.api.EventPublisher eventPublisher, IndexRecoveryManager indexRecoveryManager)
@EventListener public void onPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event)
@EventListener public void onIndexingShutdownEvent(IndexingShutdownEvent event)
@EventListener public void onImportStartedEvent(ImportStartedEvent event)
@EventListener public void onImportCompletedEvent(ImportCompletedEvent event)
public void pause()
public void start()
@EventListener public void onPluginFrameworkShutdown(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event)
public void shutdown()
Copyright © 2002-2022 Atlassian. All Rights Reserved.