You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/05/12 14:27:35 UTC

[GitHub] [lucene] jpountz opened a new pull request #137: LUCENE-9955: Reduced state of stored fields readers.

jpountz opened a new pull request #137:
URL: https://github.com/apache/lucene/pull/137


   This removes most state from stored fields readers.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] rmuir commented on pull request #137: LUCENE-9955: Reduced state of stored fields readers.

Posted by GitBox <gi...@apache.org>.
rmuir commented on pull request #137:
URL: https://github.com/apache/lucene/pull/137#issuecomment-840111367


   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:
   
   ```java
   // 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 `storedfields` would just be garbage-collected normally like any other lucene index api. So you'd still prevent `clone()/shared dictionary/whatever` resources from happening per-document, but they'd happen per-query (is this good enough?)
   
   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).


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] rmuir commented on pull request #137: LUCENE-9955: Reduced state of stored fields readers.

Posted by GitBox <gi...@apache.org>.
rmuir commented on pull request #137:
URL: https://github.com/apache/lucene/pull/137#issuecomment-882345781


   -1 to this code change which started all the new public classes/renaming problems


-- 
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@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] jpountz commented on pull request #137: LUCENE-9955: Reduced state of stored fields readers.

Posted by GitBox <gi...@apache.org>.
jpountz commented on pull request #137:
URL: https://github.com/apache/lucene/pull/137#issuecomment-841140765


   Agreed we should look into this! I opened https://issues.apache.org/jira/browse/LUCENE-9959.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org