-
Notifications
You must be signed in to change notification settings - Fork 1k
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
LUCENE-9955: Reduced state of stored fields readers. #137
Conversation
This removes most state from stored fields readers.
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.
Great find, LGTM.
it would be great to open a followup "wish" issue at least to think about ways we might remove the stored fields and term vectors threadlocals completely? The difficult part is figuring out how to make the api easy, but i feel like it should be possible, e.g. something minimally invasive like: // old
Document d1 = reader.doc(doc1);
Document d2 = reader.doc(doc2);
// new
var storedfields = reader.getStoredFields();
Document d1 = storedfields.doc(doc1);
Document d2 = storedfields.doc(doc2); then the Anyway, just worth a thought for the future. I hate making these apis difficult to use, but at the same time I don't like how trappy the threadlocals can be (especially if you arent using fixed threadpools etc). |
Agreed we should look into this! I opened https://issues.apache.org/jira/browse/LUCENE-9959. |
-1 to this code change which started all the new public classes/renaming problems |
This removes most state from stored fields readers.
#10994