Hi Simon,

> ThreadAffinityDocumentsWriterThreadPool tries to select the least
> contended DocumentsWriterPerThread for the incoming thread and if
> possible assigns the same DWPT to the thread if the associated
> (previously selected) DWPT is not contended.

ah, ok and contended or not is done via queue length ...

Some further questions if you allow :)

The naming of the collection 'perThreads' in
DocumentsWriterPerThreadPool does not make sense to me. Why not
'availableThreads'?

And what happens if two threads accessing the same ThreadState? The
second will try to lock and fail and then get the minimal contended
state (?) You said there is no problem when two threads accessing one
ThreadState, but won't two threads accessing one
DocumentsWriterPerThread make problems (e.g. when using the singleton
object docState) ?

>
> The TODO is there since there could be a selection which is not ideal
> if two threads are racing but it won't cause any exceptions etc.

Would this problem also occur if more threads than maxThreadStates try
to feed lucene?


> Is that the test you send the other day to
> the user list like 900k docs in 29 sec or something like that?

yes, still on that thing.
sorry, its certainly the way you described. I was and I am just curious
... digging day by day a bit deeper into lucene :)

Peter.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to