public class DefaultIndexRecoveryManager extends Object implements IndexRecoveryManager
Modifier and Type | Field and Description |
---|---|
static String |
INDEX_FIXER |
INDEXSNAPSHOTS, SNAPSHOT_ARCHIVE
Constructor and Description |
---|
DefaultIndexRecoveryManager(SearchService searchService,
IssueManager issueManager,
IndexLifecycleManager indexLifecycleManager,
IndexPathManager indexPathManager,
SharedEntityIndexManager sharedEntityIndexManager,
IndexingCounterManager indexingCounterManager,
IssueIndexManager indexManager,
CommentManager commentManager,
WorklogManager worklogManager,
EntityVersioningManager entityVersioningManager,
VersioningCleanupService versionsCleaner,
LegacyIndexFixer legacyIndexFixer,
com.atlassian.event.api.EventPublisher eventPublisher,
ClusterNodes clusterNodes) |
Modifier and Type | Method and Description |
---|---|
IndexRecoveryResult |
deindexEntitiesDeletedInTheLast(java.time.Duration duration,
TaskProgressSink taskProgressSink)
Applies de-index based on the versioning table (delete column.*
Why this method may be needed?
It is possible in Jira (both server and DC) that a late "update" will override a "delete".
|
com.atlassian.core.util.DateUtils.DateRange |
getDurationToRecoverUsingVersions()
Gets the updated date range for issues that need to be re-indexed because the latest updates are missing from the index.
|
boolean |
isEmpty() |
static java.time.Duration |
padDurationBetween(java.time.Instant priorTime,
java.util.function.Supplier<java.time.Instant> currentTime)
Creates a Duration of length priorTime -> currentTime PLUS an extra 24 hours.
|
static String |
readableDuration(java.time.Duration duration) |
IndexCommandResult |
recoverIndexFromBackup(File recoveryFile,
TaskProgressSink taskProgressSink)
Recovers an index from an index backup.
|
IndexRecoveryResult |
reindexWithVersionCheckEntitiesUpdatedInTheLast(java.time.Duration duration,
TaskProgressSink taskProgressSink)
This method uses versioning to short-circuit building documents when the index version is
already up-to-date with what's in the db.
|
int |
size() |
public static final String INDEX_FIXER
public DefaultIndexRecoveryManager(SearchService searchService, IssueManager issueManager, IndexLifecycleManager indexLifecycleManager, IndexPathManager indexPathManager, SharedEntityIndexManager sharedEntityIndexManager, IndexingCounterManager indexingCounterManager, IssueIndexManager indexManager, CommentManager commentManager, WorklogManager worklogManager, EntityVersioningManager entityVersioningManager, VersioningCleanupService versionsCleaner, LegacyIndexFixer legacyIndexFixer, com.atlassian.event.api.EventPublisher eventPublisher, ClusterNodes clusterNodes)
public IndexCommandResult recoverIndexFromBackup(File recoveryFile, TaskProgressSink taskProgressSink) throws IndexException
IndexRecoveryManager
recoverIndexFromBackup
in interface IndexRecoveryManager
recoveryFile
- The backup fileIndexException
- If we are unable to recover the indexpublic IndexRecoveryResult reindexWithVersionCheckEntitiesUpdatedInTheLast(java.time.Duration duration, TaskProgressSink taskProgressSink) throws IndexException
IndexRecoveryManager
duration
ago are up-to-date in the index.
They are reindexed/deindexed as needed to achieve this.reindexWithVersionCheckEntitiesUpdatedInTheLast
in interface IndexRecoveryManager
duration
- specifies how far back (from present time) to look for updated issuestaskProgressSink
- A progress sink.IndexException
public IndexRecoveryResult deindexEntitiesDeletedInTheLast(java.time.Duration duration, TaskProgressSink taskProgressSink) throws IndexException
IndexRecoveryManager
EntityVersioningManager
)
See: VersioningDao
See: NodeReindexService
See: DefaultServerIndexRepairService
deindexEntitiesDeletedInTheLast
in interface IndexRecoveryManager
duration
- specifies how far back (from present time) to look for deleted issuestaskProgressSink
- A progress sink.IndexException
public com.atlassian.core.util.DateUtils.DateRange getDurationToRecoverUsingVersions()
IndexRecoveryManager
getDurationToRecoverUsingVersions
in interface IndexRecoveryManager
public static java.time.Duration padDurationBetween(java.time.Instant priorTime, java.util.function.Supplier<java.time.Instant> currentTime)
public static String readableDuration(java.time.Duration duration)
Copyright © 2002-2022 Atlassian. All Rights Reserved.