Details
Description
lsm_tree->flags are accessed from different threads with no concurrency protection. This can cause the WT_LSM_TREE_NEED_SWITCH flag to clear while LSM operations are sleeping in _wt_clsm_await_switch() waiting on a switch to be performed by the lsm_worker. lsm_worker would skip a switch if the WT_LSM_TREE_NEED_SWITCH flag is cleared, causing operations to get stuck in _wt_clsm_await_switch() forever.