I guess code change in pr #2044 may produce death lock.So I add a test case to avoid it.
Comment From: liuyueve
hello @harawata, I think BlockingCache in current version also has this problem.
Comment From: harawata
Thank you for the test, @liuyueve .
As you noticed, the test fails with the current master as well.
The sole purpose of BlockingCache is to avoid thundering herd problem. Considering MyBatis' cache processing mechanism, it may not be possible to avoid deadlock when it is used incorrectly. Please use it wisely. :)
As there were similar reports before, I have added a javadoc comment about the risk.
p.s. You can update existing PR by pushing new changes to the same branch instead of creating a new PR on every trivial change.
Comment From: harawata
2044 is merged.
Please let me know if you have any further question.