Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-6428

Getting 'Reviewer Joined Review' Activity Items can incorrectly throw an Exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Answered
    • Low
    • N/A
    • 2.5.6, 2.7.8, 2.7.11, 2.10.0, 2.10.4, 3.0.2
    • None

    Description

      Because the implementation of ReviewerJoinActivityItemList.KeyComparator.compare is inconsistent with ReviewerJoinActivityItemList.Key.equals, and exception can be thrown:

      INFO   | jvm 1    | 2012/02/20 12:52:57 | java.lang.IllegalArgumentException: Item reviewer-join:9943:true:50:57 cannot consolidate reviewer-join:9943:false:50:19
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.crucible.activity.review.ReviewerJoinActivityItem.consolidate(ReviewerJoinActivityItem.java:67)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.crucible.activity.review.ReviewerJoinActivityItemList.add(ReviewerJoinActivityItemList.java:53)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.crucible.activity.review.LuceneReviewerJoinActivityItemProvider.searchIndex(LuceneReviewerJoinActivityItemProvider.java:135)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.crucible.activity.review.LuceneReviewerJoinActivityItemProvider.getMoreActivityItems(LuceneReviewerJoinActivityItemProvider.java:115)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.crucible.activity.review.LuceneReviewerJoinActivityItemProvider.getMoreActivityItems(LuceneReviewerJoinActivityItemProvider.java:38)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.crucible.activity.review.CoalescingActivityItemProviderBase.findActivityItemsAndCoalesce(CoalescingActivityItemProviderBase.java:27)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.crucible.activity.review.CoalescingActivityItemProviderBase.findActivityItems(CoalescingActivityItemProviderBase.java:60)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.crucible.activity.review.LuceneReviewerJoinActivityItemProvider.findActivityItems(LuceneReviewerJoinActivityItemProvider.java:63)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.fisheye.activity.DefaultActivityItemManager.findActivityItems(DefaultActivityItemManager.java:44)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.atlassian.fisheye.activity.ActivityStreamHandler.handleActivityStream(ActivityStreamHandler.java:158)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.cenqua.fisheye.web.ProjectPageAction.getActivityHandler(ProjectPageAction.java:338)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at java.lang.reflect.Method.invoke(Unknown Source)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at javax.el.BeanELResolver.getValue(BeanELResolver.java:293)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1001)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at org.apache.jsp.WEB_002dINF.jsp.project_jsp._jspx_meth_c_set_0(project_jsp.java:215)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at org.apache.jsp.WEB_002dINF.jsp.project_jsp._jspService(project_jsp.java:163)
      INFO   | jvm 1    | 2012/02/20 12:52:57 | 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)

      This exception is caught, so the impact is limited to the loss of Review Join Activity Items in that request.

      Workaround

      1. Run the following query - replace the review_ID with value found in the stack after review-join:
        SELECT * FROM CRU_LOGITEM WHERE CRU_REVIEW_ID=<review_ID> ORDER BY CRU_CREATE_DATE;

        E.g. the value in stack above is 9943 from reviewer-join:9943:

        SELECT * FROM CRU_LOGITEM WHERE CRU_REVIEW_ID=9943 ORDER BY CRU_CREATE_DATE;
      2. Identify rows with the same value in the CRU_CREATE_DATE that have the same CRU_REVIEW_ID.
      3. Stop Crucible.
      4. Backup the database.
      5. Add one second to all of the entries (CRU_LOGITEM_ID) that you identified in step #2, e.g.
        update CRU_LOGITEM set CRU_CREATE_DATE=CRU_CREATE_DATE+1000 where CRU_LOGITEM_ID=4578 and CRU_REVIEW_ID=219;

        .

      6. Start Crucible.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tom@atlassian.com Tom Davies
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: