sophia: introduce two-phase commit. sp_prepare()