lockable-resources-plugin icon indicating copy to clipboard operation
lockable-resources-plugin copied to clipboard

fix for JENKINS-64127 (ConcurrentModificationException from lock step)

Open seyguai opened this issue 5 years ago • 1 comments

See https://issues.jenkins-ci.org/browse/JENKINS-64127

Using synchronized on a method only ensures that there won't be 2 invocations of that method over the same instance. It does not protect the field used inside this method.

I replaced the type of resources from an ArrayList into a concurrent collection. I still kept the List type in org.jenkins.plugins.lockableresources.LockableResources#getResources since I wasn't sure about the impacts.

seyguai avatar Nov 04 '20 13:11 seyguai

We have the same issue ever since we started using this plugin heavily with on-demand created resources.

Nezz avatar Sep 23 '22 10:09 Nezz

No more needed. Most (hopefully all) concurrent modification exceptions are fixed noe

mPokornyETM avatar Jan 24 '24 23:01 mPokornyETM