Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query result discrepancy #2879

Open
SumStar93 opened this issue May 23, 2023 · 1 comment
Open

Query result discrepancy #2879

SumStar93 opened this issue May 23, 2023 · 1 comment

Comments

@SumStar93
Copy link

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'.

@harawata
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants