DocumentsWriterStallControl

Controls the health status of a DocumentsWriter sessions. This class used to block incoming indexing threads if flushing significantly slower than indexing to ensure the [ ]s healthiness. If flushing is significantly slower than indexing the net memory used within an IndexWriter session can increase very quickly and easily exceed the JVM's available memory.

To prevent OOM Errors and ensure IndexWriter's stability this class blocks incoming threads from indexing once 2 x number of available DocumentsWriterPerThreads in [ ] is exceeded. Once flushing catches up and the number of flushing DWPT is equal or lower than the number of active DocumentsWriterPerThreads threads are released and can continue indexing.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun isThreadQueued(threadId: Long): Boolean
Link copied to clipboard
fun updateStalled(stalled: Boolean)

Update the stalled flag status. This method will set the stalled flag to true iff the number of flushing DocumentsWriterPerThread is greater than the number of active DocumentsWriterPerThread. Otherwise it will reset the [ ] to healthy and release all threads waiting on .waitIfStalled

Link copied to clipboard

Blocks if documents writing is currently in a stalled state.

Link copied to clipboard