Use volatile variable instead of explicit lock
Lots of chicory-repository API enhancements