Duplicate data in table 'buildresultsummary' leads to 'NonUniqueResultException' 'query did not return a unique result'

XMLWordPrintable

    • Severity 3 - Minor

      Issue Description:

      When Bamboo Searches for Build result and if there are duplicates in the table 'buildresultsummary' then it leads to an error:

      2018-02-22 08:45:56,160 ERROR [localhost-startStop-1] [BuildResultsSummaryHibernateDao] Problems getting build result summary by key 'ESIGN-SDXCON317-JOB1-58449'
      org.hibernate.NonUniqueResultException: query did not return a unique result: 2
      	at org.hibernate.query.internal.AbstractProducedQuery.uniqueElement(AbstractProducedQuery.java:1487)
      	at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:388)
      
      Suggested Solution:
      • We should have a constraint on the column combination of 'build_number' and 'BUILD_KEY' to avoid getting duplicates in the database.
      Workaround:
      • We can create a constraint on the table 'buildresultsummary' with the column combination of ''build_number' and 'BUILD_KEY' but after deleting the duplicate data. And for deleting duplicates please contact support for a better investigation.

              Assignee:
              Marcin Gardias
              Reporter:
              Robhit Saxena (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: