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

Mybatis 2.3.4, remapResult true is thread unsafe, low performace when heavy traffic #89

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What version of the MyBatis are you using?
IBatis 2.3.4-726

Please describe the problem.  Unit tests are best!

report two multi thread issue 
1. remapResult is thread unsafe 
   https://issues.apache.org/jira/browse/IBATIS-770
   attach a unittest(RemapResult_thread-unsafe_unittest.patch) and fix file(RemapResult_threadunsafe_and_performace_fix.patch)
   untest is the same as IBATIS-770

2. Lock occurs when remapResult is true and heavy traffic
   many lock occurred from AutoResultMapping.getResult()

   attach a PerformanceTest and fix file(RemapResult_threadunsafe_and_performace_fix.patch)

   Performance comparison(use PerformanceTest.patch)
   threadCount:10, loopCount:10000 
   synchronized block total time    : 494361ms
   (trunk version)
   no synchronized block total time : 193063ms
   (fix version)

What is the expected output? What do you see instead?
 Plz, Review the attatched patch.

Please provide any additional information below.


Original issue reported on code.google.com by emer...@gmail.com on 24 Aug 2010 at 9:35

Attachments:

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

1 participant