Package com.atlassian.jira.index.ha
Class OpenSearchReplicatedIndexManager
java.lang.Object
com.atlassian.jira.index.ha.DefaultReplicatedIndexManager
com.atlassian.jira.index.ha.OpenSearchReplicatedIndexManager
- All Implemented Interfaces:
ReplicatedIndexManager
Implementation for the
DefaultReplicatedIndexManager to be used when OpenSearch is running.
When OpenSearch is used, the only index left on Lucene is for shared entities, and therefore all other index and deindex
methods from DefaultReplicatedIndexManager have an override to do nothing.
When the reindex end event is triggered, this adds the message to the RIO table to tell the other nodes in the cluster to reindex their shared entities.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.jira.index.ha.DefaultReplicatedIndexManager
DefaultReplicatedIndexManager.ReindexMetadataFilesProvider -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchReplicatedIndexManager(OfBizReplicatedIndexOperationStore ofBizReplicatedIndexOperationStore, TaskManager taskManager) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeIndexComment(WithIdAndVersion commentWithVersion) voiddeIndexIssue(WithIdAndVersion issueWithVersion) Removes the specified issues from the replicated index (we only need the ids for deindexing).voiddeIndexProject(Project project) voiddeIndexWorklog(WithIdAndVersion worklogWithVersion) voidonReindexAllCompleted(ReindexAllCompletedEvent reindexAllCompletedEvent) voidonReindexAllStarted(ReindexAllStartedEvent reindexAllStartedEvent) voidreindexComments(Collection<? extends WithIdAndVersion> comments) Reindexes the set of provided comments in the replicated index.voidreindexIssues(Collection<? extends WithIdAndVersion> issues) Reindexes the set of provided issues in the replicated index.voidreindexProject(Project project) Notifies other nodes that they need to perform a project reindex.voidreindexWorklogs(Collection<? extends WithIdAndVersion> worklogs) Reindexes the set of provided worklogs in the replicated index.Methods inherited from class com.atlassian.jira.index.ha.DefaultReplicatedIndexManager
deIndexSharedEntity, getOfBizReplicatedIndexOperationStore, indexSharedEntity
-
Constructor Details
-
OpenSearchReplicatedIndexManager
public OpenSearchReplicatedIndexManager(OfBizReplicatedIndexOperationStore ofBizReplicatedIndexOperationStore, TaskManager taskManager)
-
-
Method Details
-
onReindexAllStarted
- Overrides:
onReindexAllStartedin classDefaultReplicatedIndexManager
-
onReindexAllCompleted
- Overrides:
onReindexAllCompletedin classDefaultReplicatedIndexManager
-
reindexIssues
Description copied from class:DefaultReplicatedIndexManagerReindexes the set of provided issues in the replicated index.- Specified by:
reindexIssuesin interfaceReplicatedIndexManager- Overrides:
reindexIssuesin classDefaultReplicatedIndexManager- Parameters:
issues- anCollectionof issues to be reindexed
-
reindexComments
Description copied from class:DefaultReplicatedIndexManagerReindexes the set of provided comments in the replicated index.- Specified by:
reindexCommentsin interfaceReplicatedIndexManager- Overrides:
reindexCommentsin classDefaultReplicatedIndexManager- Parameters:
comments- A collection ofWithIdAndVersionrepresenting comments to reindex
-
reindexWorklogs
Description copied from class:DefaultReplicatedIndexManagerReindexes the set of provided worklogs in the replicated index.- Specified by:
reindexWorklogsin interfaceReplicatedIndexManager- Overrides:
reindexWorklogsin classDefaultReplicatedIndexManager- Parameters:
worklogs- A collection ofWithIdAndVersionrepresenting worklogs to reindex
-
deIndexIssue
Description copied from class:DefaultReplicatedIndexManagerRemoves the specified issues from the replicated index (we only need the ids for deindexing).- Specified by:
deIndexIssuein interfaceReplicatedIndexManager- Overrides:
deIndexIssuein classDefaultReplicatedIndexManager- Parameters:
issueWithVersion-WithIds for the Issues to mark as deleted.
-
deIndexComment
- Specified by:
deIndexCommentin interfaceReplicatedIndexManager- Overrides:
deIndexCommentin classDefaultReplicatedIndexManager
-
deIndexWorklog
- Specified by:
deIndexWorklogin interfaceReplicatedIndexManager- Overrides:
deIndexWorklogin classDefaultReplicatedIndexManager
-
reindexProject
Description copied from class:DefaultReplicatedIndexManagerNotifies other nodes that they need to perform a project reindex.Unlike
DefaultReplicatedIndexManager.deIndexProject(com.atlassian.jira.project.Project), this method does not create an index snapshot. This is because it is called as soon as project reindex is commenced on this node, without waiting until it's finished. Index snapshot is created inCallable.call().- Specified by:
reindexProjectin interfaceReplicatedIndexManager- Overrides:
reindexProjectin classDefaultReplicatedIndexManager
-
deIndexProject
- Specified by:
deIndexProjectin interfaceReplicatedIndexManager- Overrides:
deIndexProjectin classDefaultReplicatedIndexManager
-