sonatype/nexus — pull request #753 by cstamas (2013-02-20 15:22:54+00:00)
Title: Subordinate locking and improvement for NEXUS-5418

This change introduces a possibility left to Repository implementors to interfere (and probably modify) the UID key to UIDLock key mapping. Before this change, UID Key was used for UIDLock key as is, meaning, no different UID was using same UIDLock instance.

In this change, Maven repositories would lock artefacts and their checksums "as one", irrespective do you operate with artefact or checksum UID's (or requests or items). Simply put, this change makes Maven repositories always use the artefact lock for both, for artefacts and for their checksums.

Since this change reduces the involved locks (in case of Maven repositories) from 2 to 1, this also avoids possible deadlocks for concurrent requests tampering with same artefact and it's checksum.

Note: sorry for reformat in AbstractRepository.