Destination#pushWasCanceled: minimize time spent in critical section
When cancelling a push to a replication destination don't notify
listeners about not attempted push during the critical section where the
stateLock is held but do this immediately after the critical section.
We observed in a high-availability setup with 2 primaries that
cancelling a replication push blocked >90 other threads trying to
update some refs which tried to create new replication tasks via
synchronous events. Cancelling the push was stuck on visibility checks
done in EventBroker#fireEvent triggered by Destination#pushWasCanceled.
This visibility check was slow since the affected repository is huge
(30GiB) and we use NFS for sharing repositories between primaries.
Moving the call to PushOne#notifyNotAttempted outside the critical
section should reduce the impact of this critical section on other
requests updating refs concurrently.
Change-Id: I085700c3f4cad95ef62521527ac4b920a59c76c2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
1 file changed