com.atlassian.jira.upgrade.tasks
Class UpgradeTask_Build178

java.lang.Object
  extended by com.atlassian.jira.upgrade.AbstractUpgradeTask
      extended by com.atlassian.jira.upgrade.tasks.UpgradeTask_Build178
All Implemented Interfaces:
UpgradeTask

public class UpgradeTask_Build178
extends AbstractUpgradeTask

Makes sure that the comment index has the comment created date field indexed so it can be used for comment ordering and RSS feeds.

Note: This kicks off IssueIndexManager#reIndexAll(com.atlassian.johnson.event.Event), so it is very careful to only do so if the Comment created date is not there already. For example, if JIRA is being upgraded by importing data from XML, then by the time this upgrade task is run, re-index all has already been performed. We do not want to re-index again, to save time. On the other hand, if the upgrade is performed by pointing to an existing JIRA database that contains data, we need to re-index.

This task sample up to 100 Comment Lucene Documents from the index, and if at least one does not have the Comment created date indexed, the re-index all is performed.

If the re-index all is performed the log file is periodically updated with the progress.

This Upgrade Task should not be run when JIRA is being setup (i.e. installed afresh).


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.upgrade.UpgradeTask
UpgradeTask.Status
 
Constructor Summary
UpgradeTask_Build178(IssueIndexManager indexManager)
          Constructor.
 
Method Summary
 void doUpgrade()
          Should NOT fail (i.e.
 java.lang.String getBuildNumber()
           
 java.lang.String getShortDescription()
          A short (<50 chars) description of the upgrade action
 
Methods inherited from class com.atlassian.jira.upgrade.AbstractUpgradeTask
addError, addErrors, addErrors, getApplicationProperties, getDelegator, getErrors, getI18nBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpgradeTask_Build178

public UpgradeTask_Build178(IssueIndexManager indexManager)
Constructor.

Parameters:
indexManager - must not be null.
Throws:
java.lang.NullPointerException - if the IssueIndexManager is null
Method Detail

getBuildNumber

public java.lang.String getBuildNumber()
Specified by:
getBuildNumber in interface UpgradeTask
Specified by:
getBuildNumber in class AbstractUpgradeTask
Returns:
The build number that this upgrade is applicable to

doUpgrade

public void doUpgrade()
Should NOT fail (i.e. throw any Exceptions). If an exception occurs, the indexes are probably screwed and the users will need to do a full reindexAll anyway.

Specified by:
doUpgrade in interface UpgradeTask
Specified by:
doUpgrade in class AbstractUpgradeTask

getShortDescription

public java.lang.String getShortDescription()
Description copied from interface: UpgradeTask
A short (<50 chars) description of the upgrade action

Specified by:
getShortDescription in interface UpgradeTask
Overrides:
getShortDescription in class AbstractUpgradeTask


Copyright © 2002-2011 Atlassian. All Rights Reserved.