amnesia: move lock above transactions
amnesia: add master nodes setting
event: add basic implementation