Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-43265

UpgradeTask_Build6132 needs to handle errors better

XMLWordPrintable

    • 6.01
    • Severity 3 - Minor
    • Hide
      Atlassian Update – 28 May 2018

      Hi everyone,

      We have recently reviewed this issue and the overall interest in the problem. As the issue hasn't collect votes, watchers, comments, or support cases from many customers during its lifetime, it's very low on our priority list, and will not be fixed in the foreseeable future. That's why we've decided to resolve it as Time Out.

      Although we're aware the issue is still important to those of you who were involved in the conversations around it, we want to be clear in managing your expectations. The Jira team is focusing on issues that have broad impact and high value, reflected by the number of comments, votes, support cases, and customers interested. Please consult the Atlassian Bugfix Policy for more details.

      We understand how disappointing this decision may be, but we hope you'll appreciate our transparent approach and communication.
      Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments.

      Thank you,
      Ignat Alexeyenko
      Jira Bugmaster

      Show
      Atlassian Update – 28 May 2018 Hi everyone, We have recently reviewed this issue and the overall interest in the problem. As the issue hasn't collect votes, watchers, comments, or support cases from many customers during its lifetime, it's very low on our priority list, and will not be fixed in the foreseeable future. That's why we've decided to resolve it as Time Out . Although we're aware the issue is still important to those of you who were involved in the conversations around it, we want to be clear in managing your expectations. The Jira team is focusing on issues that have broad impact and high value, reflected by the number of comments, votes, support cases, and customers interested. Please consult the Atlassian Bugfix Policy for more details. We understand how disappointing this decision may be, but we hope you'll appreciate our transparent approach and communication. Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments. Thank you, Ignat Alexeyenko Jira Bugmaster

      Currently it does this:

          private void createIndex(final DatabaseUtil dbUtil, final ModelEntity issueEntity, final ModelIndex projNumIndex)
          {
              final String error = dbUtil.createDeclaredIndex(issueEntity, projNumIndex);
              if (error != null)
              {
                  log.error("Update failed. Read more about possible reason: "
                          + "https://confluence.atlassian.com/display/JIRAKB/Upgrading+To+JIRA+6.1+Fails+Due+To+Duplicate+Issue+Keys");
                  throw new RuntimeException("Could not create index: " + error);
              }
          }
      
          private void dropIndex(final DatabaseUtil dbUtil, final ModelEntity issueEntity, final ModelIndex projNumIndex)
          {
              final String error = dbUtil.deleteDeclaredIndex(issueEntity, issueEntity.getIndex(projNumIndex.getName()));
              if (error != null)
              {
                  throw new RuntimeException("Could not drop index: " + error);
              }
          }
      

      The problem is that upgrade tasks that use DDL need to be much more tolerant of unexpected state, because a restore can make the upgrade task history inconsistent with the expected DDL state. If I restore an instance that had not run that upgrade task, then it will attempt to run it and it will fail because the index was already deleted. Restoring a backup does not restore the previous state of the schema.

      In this particular case, since the one it creates has the same name, this is less likely. However, if it ever has data with a duplicate issue and therefore fails to recreate the unique index, it will fail from then on.

              Unassigned Unassigned
              cfuller crf
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: