-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
Improvements to allow future deployment of multiple instances #6990
Conversation
Kudos, SonarCloud Quality Gate passed! |
This allows to have multiple instances starting up but having their own separate HTML cache. If not H2 database are locked.
2b16cee
to
7cc7d6a
Compare
On startup, GeoNetwork publish each schema plugin XSDs to /data/resources/xml/schemas folder. If more that one instance starts at the same time, they can fails to copy the XSD. Adding a new data directory variables for the schemas -Dgeonetwork.schemapublication.dir=. Co-authored-by: Joachim Nielandt <[email protected]>
abce2ca
to
82063e0
Compare
* Sort by insertion order * Showing data directory html cache directory setting in admin page Co-authored-by: Joachim Nielandt <[email protected]>
82063e0
to
f078d30
Compare
SonarCloud Quality Gate failed. 0 Bugs 0.0% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
follow-up of: geonetwork#6990 Introduce docker-scalable mode for geonetwork for easy testing and separate out the html cache for each container. Related work items: #178184, #178190
|
||
private String extensionToMediaType(String ext) { | ||
final String contentType; | ||
if(Sets.newHashSet("xml", "xsd", "sch", "dtd").contains(ext)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move Sets.newHashSet("xml", "xsd", "sch", "dtd")
to an instance variable to avoid creating the set on every request?
@fxprunayre this needs to be updated to Line 71 in 71d40a1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with a single instance and looks working fine.
Before approving the pull request, I think should be provided some documentation about how to configure with multiple instances and test that scenario.
We are testing it further this week with Vlaanderen. We are planning to provide more info how to do this with docker which will explains how to configure stuff. But first want to be sure that one instance setup is all fine. And this PR should be fine. |
…pty, use the default
SonarCloud Quality Gate failed. 0 Bugs 0.0% Coverage The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
In #7337 |
HTML cache for formatter and WRO4J
This allows to have multiple instances starting up but having their own separate HTML cache. If not, H2 database are locked.
geonetwork.htmlcache.dir
can be used to cusomize the location. Another workaround is to use LRU cache insteadreplaced by
to have in memory cache (but you can't benefit from the pre-built cache).
Schema initialization
On startup, GeoNetwork publish each schema plugin XSDs to
/data/resources/xml/schemas
folder. If more that oneinstance starts at the same time, they can fails to copy the XSD. Adding a new data directory variables for the schemas
-Dgeonetwork.schemapublication.dir=
.Admin / Site info
Added all config keys to make easier configuration check on each instance:
Harvester
Add configuration to only run scheduled harvesting tasks in one instance.
See #7217
Future improvements