mybatis-3
mybatis-3 copied to clipboard
Query result discrepancy
When multiple (dozens) of queries are executed simultaneously, there is an occurrence where a different query result is returned for a specific query. For example, let's say there are query A and query B, and their respective results should be result A and result B, but the following combinations of results are returned: query A: result B query B: result A
The version and other information provided are as follows:
Version: '2.2.0' Implementation group: 'org.mybatis.spring.boot' Name: 'mybatis-spring-boot-starter' Currently, to avoid such issues, we are using 'flushCache=true'.
Hello @SumStar93 ,
It sounds like you are sharing some object that is not thread safe between multiple threads. There are some general advices in the following page. https://mybatis.org/spring/using-api.html
If your project is relatively simple and can be shared publicly on your GitHub repo, I would take a look when I have some time.