CDB-3696 new-new logic of locking :)