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
SOLR-14335: Lock Solr's memory to prevent swapping #1364
Conversation
Add Main-Class and Class-Path to solr.jar manifest
I updated to have a separate This is still gradle only, so |
Control memlock feature with SOLR_MEMORY_LOCK=true env.var
Control memlock feature with SOLR_MEMORY_LOCK=true env.var
solr/bootstrap/src/java/org/apache/solr/bootstrap/SolrBootstrap.java
Outdated
Show resolved
Hide resolved
manifest { | ||
attributes( | ||
'Main-Class': 'org.apache.solr.bootstrap.SolrBootstrap', | ||
'Class-Path': '. lib/start.jar jna.jar' |
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.
This is a chance to clean up manual jar naming, actually. The classpath here should be something like this:
"Class-Path": configurations.runtimeClasspath.collect { "lib/${it.getName()}" }.join(' '))
then bootstrap would have accurate coordinates at the exact library versions it needs to launch. Plus -- the "rename" trickery wouldn't be needed anymore in server.gradle.
The name of the output artifact (bootstrap.jar) can be set in this project as well (so that it doesn't have a version in the name).
jar.archiveName = "boostrap.jar"
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.
I tried this, but got
- What went wrong:
A problem occurred evaluating project ':solr:bootstrap'.Not allowed to resolve configuration ':solr:bootstrap:runtimeClasspath' at configuration time (https://guides.gradle.org/performance/#don_t_resolve_dependencies_at_configuration_time). Please upgrade your plugins and double-check your gradle scripts (see stacktrace)
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.
If you get it working, you may in fact push a change to the PR branch
Lucene and Solr development has moved to separate git repositories and this PR is being bulk-closed.\nPlease open a new PR against https://github.com/apache/solr or https://github.com/apache/lucene if your contribution is still relevant to the project. |
See https://issues.apache.org/jira/browse/SOLR-14335
Goal of this PR is to start Solr with a custom bootstrap class, which delegates to Jetty's main. In the custom bootstrap class, we will then implement memroy locking through JNA