Add commit and rollback with bugs

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>