GSharayu opened a new issue #6858: URL: https://github.com/apache/incubator-pinot/issues/6858
The refresh thread maintains a single global queue of realtime text index readers across all consuming segments across all tables. A reader is polled, refreshed and supposed to be added back to the queue so that it can be refreshed again in the next cycle. There is a race condition: If we find the queue empty, but something gets added before we lock the mutex, the thread signal will be lost and it will be in await mode until next segment signals. Set of steps for race condition 1. Thread finds queue empty and enters the while check on https://github.com/apache/incubator-pinot/blob/master/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/invertedindex/RealtimeLuceneIndexReaderRefreshThread.java#L69 2. Meanwhile another thread grabs lock at https://github.com/apache/incubator-pinot/blob/master/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/invertedindex/RealtimeLuceneIndexRefreshState.java#L86 3. The current thread adds the segment in queue and signals the condition variable (right now its not hold) 4. The lock after released from step 3 will be grabbed by thread in step 1 5. It will then await for signal on condition variable(Which is bug!) and might have to wait until some other segment signals it -- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
