Open
Description
This is a spin-off issue from discussion in #128 as we noticed there's a subtle way to cause deadlock in test (or maybe even in production code if similar logic is implemented) #128 (comment)
This issue is to review how synchronization can be improved between these classes to make it less deadlock-prone, or more explicit when locking arrangement needs to be made.
Migrated from LUCENE-10071 by Zach Chen (@zacharymorn), updated Aug 28 2021