lucene icon indicating copy to clipboard operation
lucene copied to clipboard

LUCENE-10005: Improve AlreadyClosedException logging

Open asalamon74 opened this issue 4 years ago • 1 comments

Description

AlreadyClosedException logging is misleading.

#11044

Solution

Improve logging.

Tests

Tested by backporting to Lucene 8.4.1

Checklist

Please review the following and check all that apply:

  • [x] I have reviewed the guidelines for How to Contribute 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.
  • [x] I have given Lucene maintainers access 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.
  • [x] I have added tests for my changes.

asalamon74 avatar Jun 16 '21 14:06 asalamon74

Lucene doesn't do any logging. If you want to improve the logging, please open an issue in SOLR.

I don't think we should do this. However we format the date, it may not be in the correct format / timezone / etc to be of any use. In fact, it may just cause more confusion to see a GMT-preformatted date when the rest of my dates in logs are in localtime.

Also keep in mind "tragic exception" in lucene is very delicate handling. We shouldn't be allocating memory, formatting dates, stuff like this. It is supposed to be only for handling things like virtual machine error such as OutOfMemoryError!

I don't know why your solr HDFS example becomes "tragic", perhaps Solr is abusing this mechanism? Again, that is a problem to fix over there.

rmuir avatar Jun 17 '21 10:06 rmuir

Thanks @asalamon74 -- looks like we shouldn't fix this in Lucene, but instead Solr.

mikemccand avatar Nov 02 '23 11:11 mikemccand