Add critical section around sample_store_reset