Open asfimport opened 3 years ago
Marc D'Mello (@mdmarshmallow) (migrated from JIRA)
Hi, I would like to work on this issue.
Marc D'Mello (@mdmarshmallow) (migrated from JIRA)
Since the results in this JIRA suggest that the cache might not be doing as good of a job as we thought it was, it might get removed. I'll get back to this issue in a few days.
When we close a
DirectoryTaxonomyReader
indoClose
, we set thecategoryCache
to null. But if a thread is next after thisdoClose
call, it will still try to acquire a lock andsynchronize
on it. This will result in an NPE.This works well today, because we operate on the assumption that the user will always call
doClose
after all threads have completed. One suggestion by @mikemccand in this PR was to make categoryCache final and throw an AlreadyClosedException.Migrated from LUCENE-10077 by Gautam Worah (@gautamworah96), updated Sep 01 2021