Ok, the idea behind commit status is following:
status = sp_commit(tx)
(0) transaction commited:
all data has been successfully written to the storage.
the transaction is no longer exists.
(1) transaction forced to rollback on commit:
conflicting data has been changed by other commited transaction.
the transaction is no longer exists.
(2) in-lock
the transaction is in conflict by some other active transaction.
the transaction is exists.
Basically this status means that sp_commit(tx) should be retried later. In case if the conflicting transaction
(or all of them) are aborted for some reason, then transaction yet has a chance for
successfull commit.
Following status can be used to implement an appllication specifics timeout,
resolve deadlocks, etc.
(-1) transaction forced to rollback on error
disk error, out-of-memory, etc.
the transaction is no longer exists.