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

Bug: GlobalIdPK cache is not clear when transaction rollback has been performed in Javers 2.7.2 version #472

Closed
YaraslauBarysenka opened this issue Nov 30, 2016 · 1 comment

Comments

@YaraslauBarysenka
Copy link

YaraslauBarysenka commented Nov 30, 2016

The #467 issue is still reproducible when I use Javers 2.7.2 version.

In order to reproduce the issue use the same updated example:
javers-bug-example.zip

The all steps and instructions are the same.

P.S.
Thank you for your help and quick responses.

@bartoszwalacik
Copy link
Member

As far as I can see from this example, you are not using our javers-spring integration module http://javers.org/documentation/spring-integration/

That's the recommended way for javers-spring integration and that's the place where I fixed the issue. See javadoc for JaversSqlRepository.evictCache()
https://github.com/javers/javers/blob/master/javers-persistence-sql/src/main/java/org/javers/repository/sql/JaversSqlRepository.java

If you don't want to use javers-spring module you can disable the cache using
SqlRepositoryBuilder.withGlobalIdCacheDisabled() or call JaversSqlRepository.evictCache() on each rollback, just like we do in JaversTransactionalDecorator

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

No branches or pull requests

2 participants