refactor replication, deprecate relaylog