Adding SrvShard locking and test code.