-
-
Notifications
You must be signed in to change notification settings - Fork 366
Bug: GlobalIdPK cache is not clear when transaction rollback has been performed #467
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
Comments
First, thanks for a high quality bug report. You are right, this cache is simply non-transactional. Did you looked at javers source ? Maybe you are eager to contribute a Pull Request with a fix? |
Making this cache transactional could be hard. Maybe good error handling is enough, cache clean + retry |
Sorry, we don't have enough resources to make a pull request. Provide method to set custom cache by interface when we build Javers object and make public method to get this cashe? Like this: Cache customCache = new CustomCacheImpl(); |
I will provide a method to evict the cache, you will be calling this method after doing rollback, ok? |
Would it be possible to expose configuration to configure the cache including disabling it ? |
It is nice to make possibility to evict a cache, but would be great to make a cache configurable. |
ok, disable switch for the cache seems reasonable |
disable cache switch, evict cache method
The easy part is done, now we should configure Spring Transaction Manager to call our new cache |
evict cache on transaction rollback
fixed in 2.7.2. You don't need to change your configuration, just use the new version. Now, when Spring Transaction Manager rolls back a transaction, the cache is automatically evicted. |
Thank you for your work, but the issue is still reproducible. |
This issue is fixed in |
Expectations versus reality
Preconditions
Expected Result
Current Result
Runnable test case
The application to reproduce issue here: javers-bug-example.zip
Please, read an instruction about how to reproduce the issue using the application here: instrution.txt
P. S.
If you have questions, please let's me know.
Guys, thank you for your work. It is very helpful for us.
Thank you in advance.
The text was updated successfully, but these errors were encountered: