OfBizUserHistoryStore not thread safe, but called from within webwork action

XMLWordPrintable

    • 4

      When viewing an issue we add this issue to the history of viewed item for this user.

      In IssueActionSupport we call userHistoryManager.addIssueToHistory(remoteUser, issueObj);

      Before the OfBizUserHistoryStore persists this history item to the database, it attempts to remove an history item for this issue.

      If the user views an issue which is already part of the history, it leads to a delete and then an insert SQL operation. If the number of concurrent http requests is getting too high EntityEngine will fall over and not be able to create
      valid primary keys for the history items. To fix this problem the remove and insert operation have to be synchronized, but this will cause Thread Contention.

      Furthermore after inserting a new history item we select all history items for this user and delete history items if they exceeded the configured maximum (jira.max.history.items).
      This also happens for almost every http request. Only if the user re-visits an issue which is already part of the history we skip this check.

              Assignee:
              Nick Menere [Atlassian] (Inactive)
              Reporter:
              Felix Schmitz [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: