-
-
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 #7337
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows to have multiple instances starting up but having their own separate HTML cache. If not H2 database are locked.
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]>
* Sort by insertion order * Showing data directory html cache directory setting in admin page Co-authored-by: Joachim Nielandt <[email protected]>
…vester scheduler. Add some more precise doc links.
Added hostname to the system information panel. As we discussed previously, more HA-related information is helpful to determine correct behaviour of multiple instances. Knowing which instance is running surely needs to be there. Co-authored-by: Joachim Nielandt <[email protected]>
When using multiple nodes, one is in charge of harvesting tasks. Use the following configuration for this node: ``` HARVESTER_SCHEDULER_ENABLED: "true" HARVESTER_REFRESH_INTERVAL_MINUTES: 2 ``` The node will then check every 2 minutes for any harvesting configuration changes and updates its schedule. This is a stopgap solution until we define a better messaging system to deal with those cases. Keep the default config if running only one node. Co-authored-by: Joachim Nielandt <[email protected]>
This was referenced Sep 13, 2023
josegar74
reviewed
Sep 25, 2023
harvesters/src/main/java/org/fao/geonet/kernel/harvest/HarvestManagerImpl.java
Show resolved
Hide resolved
harvesters/src/main/java/org/fao/geonet/kernel/harvest/RefreshHarvesterJob.java
Outdated
Show resolved
Hide resolved
…HarvesterJob.java Co-authored-by: Jose García <[email protected]>
SonarCloud Quality Gate failed. 0 Bugs 0.0% Coverage The version of Java (11.0.20.1) 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 |
josegar74
approved these changes
Sep 27, 2023
Merged
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Various experiments were done in GeoNetwork 3 to try to deploy multiple instances and the main issue was the Lucene index. Moving to Elasticsearch in version 4 allows to easily share the index and setup a cluster of Elasticsearch nodes if needed.
With https://metadata.vlaanderen.be/ team, we analyzed other limitations related to a multiple instances setup and fixed the main issue. Without altering a single instance mode, we describe below the changes made, provide a docker configuration for testing it and list remaining known limitations that we can improve in the future.
This PR combine the work done in the following PR for easier testing:
For testing the easiest is to use the docker configuration https://github.com/geonetwork/docker-geonetwork/tree/update-gn-4.4.0/4.4.0#clustering-experimental to easily start the main node and replicas.
Docker configuration is done in geonetwork/docker-geonetwork#107
Changes
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 customize 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
Admin console information panel provides relevant information to check node configuration (hostname, harvester configuration):
Harvester
Add configuration to only run scheduled harvesting tasks in one instance which will reload harvester configuration on a regular basis.
Java 11 fixes
Remaining known limitations
Future improvements