[ 
https://issues.apache.org/jira/browse/LUCENE-9304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17081230#comment-17081230
 ] 

ASF subversion and git services commented on LUCENE-9304:
---------------------------------------------------------

Commit 2602269f3ec856f55a08a0c5a32a1364fd9c25ea in lucene-solr's branch 
refs/heads/master from Simon Willnauer
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=2602269 ]

LUCENE-9304: Refactor DWPTPool to pool DWPT directly (#1397)

This change removes the ThreadState indirection from DWPTPool and pools DWPT 
directly. The tracking information and locking semantics are mostly moved to 
DWPT directly and the pool semantics have changed slightly such that DWPT need 
to be checked-out in the pool once they need to be flushed or aborted. This 
automatically grows and shrinks the number of DWPT in the system when number of 
threads grow or shrink. Access of pooled DWPTs is more straight forward and 
doesn't require ordinal. Instead consumers can just iterate over the elements 
in the pool.
This allowed for removal of indirections in DWPTFlushControl like BlockedFlush, 
the removal of DWPTPool setter and getter in IndexWriterConfig and the addition 
of stronger assertions in DWPT and DW.

> Clean up DWPTPool 
> ------------------
>
>                 Key: LUCENE-9304
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9304
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: master (9.0), 8.6
>            Reporter: Simon Willnauer
>            Priority: Major
>          Time Spent: 9h 10m
>  Remaining Estimate: 0h
>
> DWPTPool currently uses an indirection called ThreadState to hold DWPT 
> instances. This class holds several information that belongs in other places, 
> inherits from ReentrantLock and has a mutable nature. Instead we could pool 
> the DWPT directly and remove other indirections  inside DWPTFlushControl if 
> we move some of the ThreadState properties to DWPT directly. The threadpool 
> also has a problem that is grows it's ThreadStates to the number of 
> concurrently indexing threads but never shrinks it if they are reduced. With 
> pooling DWPT directly this limitation could be removed. 
> In summary, this component has seen quite some refactoring and requires some 
> cleanups and docs changes in order to stay the test of time.  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to