txn visibility: shrink the codes