Uploaded image for project: 'JIRA Service Desk Server'
  1. JIRA Service Desk Server
  2. JSDSERVER-5535

ServiceDeskOnCompletionExpectationManagerImpl Inconsistent Cache state prevents customer notifications from being sent

    XMLWordPrintable

    Details

      Description

      Summary

      ServiceDeskOnCompletionExpectationManagerImpl Inconsistent Cache state prevents customer notifications from being sent

      Environment

      Jira Service Desk 3.9.0

      Steps to Reproduce

      1. As an Agent, Resolve an issue an existing issue via transition

      Expected Results

      customer would get notification of case being resolved

      Actual Results

      No notification is being sent to the customer, but the case is still getting resolved in Service Desk. In the logs we see the error

      2017-11-30 08:35:22,983 http-nio-8080-exec-2 WARN kamil 515x1800x1 1gvj1mo 172.20.7.1,127.0.0.1 /secure/CommentAssignIssue.jspa [c.a.s.p.b.internal.events.ServiceDeskOnCompletionExpectationManagerImpl] Inconsistent Cache state, as object returned event 'com.atlassian.jira.event.issue.IssueEvent@dcaf0ad[issue=CS-2479,comment=com.atlassian.jira.issue.comments.CommentImpl@c9797e64,worklog=<null>,changelog=[GenericEntity:ChangeGroup][id,40615][issue,22104][author,admin][created,2017-11-30 08:35:22.927],eventTypeId=13,sendMail=true,params={eventsource=workflow, baseurl=https://jira.pass},subtasksUpdated=false]' but expecting 'IssueChangedEventImpl{changeItems=[com.atlassian.jira.issue.history.ChangeItemBean@52668145[fieldType=jira,field=resolution,from=<null>,fromString=<null>,to=1,toString=Fixed,created=2017-11-30 08:35:22.927], com.atlassian.jira.issue.history.ChangeItemBean@1683f5bf[fieldType=jira,field=status,from=10301,fromString=Waiting for customer,to=5,toString=Resolved,created=2017-11-30 08:35:22.927]], author=Optional[kamil(admin)], comment=Optional[com.atlassian.jira.issue.comments.CommentImpl@c9797e64], issue=CS-2479, eventTime=Thu Nov 30 08:35:22 UTC 2017, sendMail=true}'
      2017-11-30 08:35:23,011 http-nio-8080-exec-2 WARN kamil 515x1800x1 1gvj1mo 172.20.7.1,127.0.0.1 /secure/CommentAssignIssue.jspa [c.a.s.p.b.internal.events.ServiceDeskOnCompletionExpectationManagerImpl] Inconsistent Cache state, as object returned event 'com.atlassian.jira.event.issue.IssueEvent@dcaf0ad[issue=CS-2479,comment=com.atlassian.jira.issue.comments.CommentImpl@c9797e64,worklog=<null>,changelog=[GenericEntity:ChangeGroup][id,40615][issue,22104][author,admin][created,2017-11-30 08:35:22.927],eventTypeId=13,sendMail=true,params={eventsource=workflow, baseurl=https://jira.pass},subtasksUpdated=false]' but expecting 'IssueChangedEventImpl{changeItems=[com.atlassian.jira.issue.history.ChangeItemBean@462a365a[fieldType=jira,field=resolution,from=<null>,fromString=<null>,to=1,toString=Fixed,created=2017-11-30 08:35:22.927], com.atlassian.jira.issue.history.ChangeItemBean@6f352c2e[fieldType=jira,field=status,from=10301,fromString=Waiting for customer,to=5,toString=Resolved,created=2017-11-30 08:35:22.927]], author=Optional[kamil(admin)], comment=Optional[com.atlassian.jira.issue.comments.CommentImpl@c9797e64], issue=CS-2479, eventTime=Thu Nov 30 08:35:22 UTC 2017, sendMail=true}'
      2017-11-30 08:35:23,022 http-nio-8080-exec-2 WARN kamil 515x1800x1 1gvj1mo 172.20.7.1,127.0.0.1 /secure/CommentAssignIssue.jspa [c.a.s.p.b.internal.events.ServiceDeskOnCompletionExpectationManagerImpl] Inconsistent Cache state, as object returned event 'com.atlassian.jira.event.issue.IssueEvent@dcaf0ad[issue=CS-2479,comment=com.atlassian.jira.issue.comments.CommentImpl@c9797e64,worklog=<null>,changelog=[GenericEntity:ChangeGroup][id,40615][issue,22104][author,admin][created,2017-11-30 08:35:22.927],eventTypeId=13,sendMail=true,params={eventsource=workflow, baseurl=https://jira.pass},subtasksUpdated=false]' but expecting 'IssueChangedEventImpl{changeItems=[com.atlassian.jira.issue.history.ChangeItemBean@6c1ebaeb[fieldType=jira,field=resolution,from=<null>,fromString=<null>,to=1,toString=Fixed,created=2017-11-30 08:35:22.927], com.atlassian.jira.issue.history.ChangeItemBean@e8b73f[fieldType=jira,field=status,from=10301,fromString=Waiting for customer,to=5,toString=Resolved,created=2017-11-30 08:35:22.927]], author=Optional[kamil(admin)], comment=Optional[com.atlassian.jira.issue.comments.CommentImpl@c9797e64], issue=CS-2479, eventTime=Thu Nov 30 08:35:22 UTC 2017, sendMail=true}' 
      

      Notes

      • The transition is firing an issueevent, but this event is also subsequently triggering other actions on the same thread. In turn when SD goes to check this issue in order to create the jsd notification, the status has already changed for that issue which in turn is generating this inconsistent cache state as an error that indicates jsd cannot send a message on this issue.
      • It is possible that other event based actions in Jira could also be affected by this bug. So far we just focused on notifications not working. But it follows that other event driven features such as automation, could be affected by these nested events not all getting fired as expected.

      Workaround

      1. navigate to $JIRAURL /secure/SiteDarkFeatures!default.jspa you will need to be a Jira system administrator to reach this page
      2. remove the feature flag "sd.internal.base.off.thread.on.completion.events.enabled"
      3. While this work-around can help prevent the event based problems noted in this bug, once the upgrade for 3.9.2 has been released/applied, I would recommend turning back on "sd.internal.base.off.thread.on.completion.events.enabled" so that get the benefits of faster requests (SLA indexing / updating and others will happen asynchronously).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mmcmahon Matthew McMahon
                Reporter:
                pawel1548891083 Paweł Stasicki
              • Votes:
                14 Vote for this issue
                Watchers:
                34 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: