Uploaded image for project: 'Opencast'
  1. MH-13468

Capture Agent Registration Exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed and reviewed
    • Affects versions: 7.0
    • Fix versions: 7.0
    • Components: RESTful Interfaces
    • Labels:
      None
    • Severity:
      Cosmetic Issue
    • Steps to reproduce:
      Hide
      When switching from a lazy capture agent state update to a new, accurate
      one for pyCA which would cause the agent to first register itself as
      offline and once it is available (which can be really fast) stating it's
      status as idle, I noticed that Opencast will often fail if two agent state
      requests are handled concurrently.

      In short, what happens is that for both requests, Opencast (or rather
      the Java persistence code) decides to use an SQL insert statement,
      ultimately causing a primary key conflict for the slower one.

      This patch fixes the problem by catching the conflict and repeating the
      process, now being certain that the resource already exists which causes
      an SQL update to be used instead.

      Note that the underlying eclipselink library still logs a warning when
      this problem occurs.
      Show
      When switching from a lazy capture agent state update to a new, accurate one for pyCA which would cause the agent to first register itself as offline and once it is available (which can be really fast) stating it's status as idle, I noticed that Opencast will often fail if two agent state requests are handled concurrently. In short, what happens is that for both requests, Opencast (or rather the Java persistence code) decides to use an SQL insert statement, ultimately causing a primary key conflict for the slower one. This patch fixes the problem by catching the conflict and repeating the process, now being certain that the resource already exists which causes an SQL update to be used instead. Note that the underlying eclipselink library still logs a warning when this problem occurs.

      TestRail: Results

        Attachments

          Activity

            People

            • Assignee:
              lkiesow Lars Kiesow
              Reporter:
              lkiesow Lars Kiesow
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                TestRail: Cases