#986 - Provide locking for order operations

Cherry picked from (dbf2720d24c5ec5b9be7cd89935227a69c5b1eba)
#986 - Keep session locks in a separate map