Merge changes I78cd6a32,I99656d57 into tm-dev

* changes:
  Fix PMS recordInitialState on retry
  Avoid taking PMS snapshot lock when snapshot is still valid