Am 27.12.2016 um 21:52 schrieb Vladimir Sitnikov:
On managersInUse we use
wait() and notify(), which seems wrong to me, as we synchronized using
LOCK and not managersInUse.
Is that code used at all?
Could be, but probably only very seldom. I now have looked into the history of this file and seen, that is was changed rather recently to use a static lock field. I will check in some tests and a corrected version of this filter.

It looks like the code in [1] must throw (the same regarding .wait() code
below)

IllegalMonitorStateException  if the current thread is not
*               the owner of this object's monitor


By the way, [2] should re-interrupt and terminate the loop. For instance,
if user clicks stop, then this while(managersInUse.contains(cm)) should get
terminated instead of retrying again and again.
With [2] I am not so sure. managersInUse should be cleared by threadFinished. But I am not so sure about this and you are probably right :)

Thanks for the review.

Felix

[1]:
https://github.com/apache/jmeter/blob/1139c450e33c136abaa9640804839ba02760f844/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/SessionFilter.java#L167
[2]:
https://github.com/apache/jmeter/blob/1139c450e33c136abaa9640804839ba02760f844/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/SessionFilter.java#L191-L193


Vladimir


Reply via email to