You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "culmat (via GitHub)" <gi...@apache.org> on 2023/11/15 20:42:59 UTC
[PR] SOLR-16865 : Solr should warn about low disk space upon startup [solr]
culmat opened a new pull request, #2080:
URL: https://github.com/apache/solr/pull/2080
https://issues.apache.org/jira/browse/SOLR-16865
# Description
SOLR starts even with data directories on partitions with low disk space, which leads to crashes after the start.
# Solution
Warn on the user on start up.
# Tests
Manual inspection.
# Checklist
Please review the following and check all that apply:
- [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
- [x] I have created a Jira issue and added the issue ID to my pull request title. ( was existing)
- [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
- [x] I have developed this patch against the `main` branch.
- [x] I have run `./gradlew check`.
- [ ] I have added tests for my changes.
- [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16865 : Solr should warn about low disk space upon startup [solr]
Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on PR #2080:
URL: https://github.com/apache/solr/pull/2080#issuecomment-1911009201
I don't have too much context here, but happy to help out. I've updated this PR by pulling in the latest 'main', and it passes `./gradlew check -x test` which is great, but....
It looks like tests are failing because of an NPE introduced in this code:
```
2> Caused by: java.lang.NullPointerException
2> at java.base/java.util.Objects.requireNonNull(Objects.java:209) ~[?:?]
2> at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:263) ~[?:?]
2> at java.base/java.nio.file.Path.of(Path.java:147) ~[?:?]
2> at java.base/java.nio.file.Paths.get(Paths.java:69) ~[?:?]
2> at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1706) ~[solr-core-10.0.0-SNAPSHOT.jar:10.0.0-SNAPSHOT 4f525ba5c8d2ab42c2e821ecd261acc555729729 [snapshot build, details omitted]]
2> at org.apache.solr.core.CoreContainer.lambda$loadInternal$12(CoreContainer.java:1056) ~[solr-core-10.0.0-SNAPSHOT.jar:10.0.0-SNAPSHOT 4f525ba5c8d2ab42c2e821ecd261acc555729729 [snapshot build, details omitted]]
2> at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:212) ~[metrics-core-4.2.21.jar:4.2.21]
2> at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
2> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
2> at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:294) ~[solr-solrj-10.0.0-SNAPSHOT.jar:10.0.0-SNAPSHOT 4f525ba5c8d2ab42c2e821ecd261acc555729729 [snapshot build, details omitted]]
2> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
2> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
2> ... 1 more
```
The problem appears to be that some configurations don't define a data dir, and so the `Paths.get` call [here](https://github.com/apache/solr/pull/2080/files#diff-b55d06ed2f9b3b541be083c5bb4fc09ddf0017f55938c9091bc558ed2e48cc02R1706) receives 'null'.
Should be pretty straightforward to bracket this check based on whether or not we actually have a non-null dataDir, I'd guess? You want to take a crack at it @culmat ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16865 : Solr should warn about low disk space upon startup [solr]
Posted by "cpoerschke (via GitHub)" <gi...@apache.org>.
cpoerschke commented on PR #2080:
URL: https://github.com/apache/solr/pull/2080#issuecomment-1825382769
Probably same as https://github.com/apache/solr/pull/2069#issuecomment-1824836537 and merging in latest `origin/main` would fix it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16865 : Solr should warn about low disk space upon startup [solr]
Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on PR #2080:
URL: https://github.com/apache/solr/pull/2080#issuecomment-1911016614
As a side note, CoreContainer is definitely the correct place to invoke this warning logic, but I wonder whether the bulk of this code couldn't live in a static utility somewhere (looks like we already have a `FileUtils` class in solr-core).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16865 : Solr should warn about low disk space upon startup [solr]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2080:
URL: https://github.com/apache/solr/pull/2080#issuecomment-2019129076
This PR had no visible activity in the past 60 days, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the dev@solr.apache.org mailing list. Thank you for your contribution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16865 : Solr should warn about low disk space upon startup [solr]
Posted by "cpoerschke (via GitHub)" <gi...@apache.org>.
cpoerschke commented on PR #2080:
URL: https://github.com/apache/solr/pull/2080#issuecomment-1876908119
Just re-discovered this pull request via the https://issues.apache.org/jira/browse/SOLR-16865 ticket -- based on its history tagging @chatman and @gerlowskija as potential reviewers, thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16865 : Solr should warn about low disk space upon startup [solr]
Posted by "culmat (via GitHub)" <gi...@apache.org>.
culmat commented on PR #2080:
URL: https://github.com/apache/solr/pull/2080#issuecomment-1824777605
Hi there, I don't know why this fails with style warnings on test / mock code I have not modified.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16865 : Solr should warn about low disk space upon startup [solr]
Posted by "culmat (via GitHub)" <gi...@apache.org>.
culmat commented on PR #2080:
URL: https://github.com/apache/solr/pull/2080#issuecomment-1836674636
Thanks for the advice @cpoerschke. I merged main. Hope this time the validation will run through 🤞
Have a nice week end.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org