Conditionally synchronize Archive Service's add mediapackge

Description

Currently, the archive add() method is synchronized in the archive service to protect "oc_latest_version" flag on a mediapackage. But, this protection is only needed for concurrent archives of the same mediapackge Id. Archive's for different mediapackage Id's have their own oc_latest_version flag, so they do not need to be synchronized. Also, it is very unlikely that two mediapackges of the same mediapackageId to be archiving at the same time.

Allowing more than one mediapackage to archive at the same time speeds up the archive step when multiple workflows are processing.

The proposal is to keep track of actively archiving mediapackages and conditionally synchronize when two mediapackages have the same Id.

https://bitbucket.org/opencast-community/matterhorn/src/24371827d47fcd8d2e7238319411b961ec3697d3/modules/matterhorn-archive-base/src/main/java/org/opencastproject/archive/base/ArchiveBase.java?at=r%2F2.1.x&fileviewer=file-view-default#ArchiveBase.java-172

Assignee

James Perrin

Reporter

Former user

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Minor
Configure