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

Fixes for hibernate/ehcache #940

Merged
merged 6 commits into from
Oct 25, 2024
Merged

Fixes for hibernate/ehcache #940

merged 6 commits into from
Oct 25, 2024

Conversation

dnlkoch
Copy link
Member

@dnlkoch dnlkoch commented Oct 25, 2024

Description

This applies several fixes for the hibernate (especially the second-level) cache and the appropriate ehcache configuration:

  • add missing cache regions to the ehcache.xml
  • update the default application.yml to actually make use of the ehcache.xml (I suppose this change is needed since we updated to Spring Boot 3 and resulted in the logger warnings below)
  • make findAllById cacheable (this e.g. used while loading the layers in an application in the GIS client)
  • make PublicInstancePermission entities cacheable (this is potentially used in every permission check)

Before:

WARN  org.hibernate.orm.cache.createCache() @108 - HHH90001006: Missing cache[applications] was created on-the-fly. The created cache will use a provider-specific default configuration: make sure you defined one. You can disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'.
INFO  org.ehcache.core.EhcacheManager.createCache() @305 - Cache 'applications' created in EhcacheManager.

After:

INFO  org.ehcache.shadow.org.terracotta.offheapstore.paging.UpfrontAllocatingPageSource.<init>() @149 - Allocating 10.0MB in chunks
09:39:09.734 INFO  org.ehcache.core.EhcacheManager.createCache() @305 - Cache 'applications' created in EhcacheManager.
(…)
INFO  org.ehcache.jsr107.Eh107CacheManager.registerObject() @393 - Registering Ehcache MBean javax.cache:type=CacheStatistics,CacheManager=jar.file./root/.m2/repository/de/terrestris/shogun-config/21.1.3-SNAPSHOT/shogun-config-21.1.3-SNAPSHOT.jar!/ehcache.xml,Cache=applications

Please review @terrestris/devs.

Related issues or pull requests

--

Pull request type

  • Bugfix
  • Feature
  • Dependency updates
  • Tests
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe)

Do you introduce a breaking change?

  • Yes
  • No

Checklist

  • I understand and agree that the changes in this PR will be licensed under the
    Apache Licence Version 2.0.
  • I have followed the guidelines for contributing.
  • The proposed change fits to the content of the code of conduct.
  • I have added or updated tests and documentation, and the test suite passes (run mvn test locally).
  • I have added a screenshot/screencast to illustrate the visual output of my update.

@dnlkoch dnlkoch marked this pull request as ready for review October 25, 2024 11:34
Copy link
Member

@LukasLohoff LukasLohoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🎉

@ahennr
Copy link
Member

ahennr commented Oct 25, 2024

🚀

@dnlkoch
Copy link
Member Author

dnlkoch commented Oct 25, 2024

Thanks for the reviews!

@dnlkoch dnlkoch merged commit d24d9e3 into main Oct 25, 2024
4 checks passed
@dnlkoch dnlkoch deleted the fix-cache branch October 25, 2024 13:00
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

Successfully merging this pull request may close these issues.

4 participants