Merge "Revert "Use snapshot API to avoid locks."" into main