feat(lifecycle): meter the tombstone transaction (#1719 stack: 3/3)
This part instruments the lifecycle tombstone transaction, the last of the transactions #1719 (closed) scopes.
tombstoneTx opens its own BeginTx for READ COMMITTED, so it defers metrics.InstrumentTx(datastore.TxLifecycleTombstone) and marks a failed Commit with CommitFailedError.
Its rollback defer now recovers a panic, rolls back and re-panics, so a panic no longer leaks the transaction and its row lock.
The internal and management-API integration tests pin the committed, commit_error, rolled_back and panic bookings, and assert that a commit failure books no rolled_back outcome.
A datastore test pins lifecycle_tombstone_tx, the label the tombstone transaction publishes under.
No end-to-end scenario changes: a destructive delete still answers 202, and the tombstoned repository still fails every read.
Stack
This merge request is part 3 of 3 of one reviewed change (vespian_gl/issue-1719-publish-transaction-duration-and-outcome), split into a stack so each part is reviewable on its own. Merge the parts in this order, bottom first:
- !3545 (merged) feat(metrics): add the transaction metric families (#1719 (closed) stack: 1/3)
- !3546 (merged) feat(datastore): name every transaction for metrics (#1719 (closed) stack: 2/3)
- !3532 (merged) feat(lifecycle): meter the tombstone transaction (#1719 (closed) stack: 3/3) (this merge request)
Parts 1 and 2 are on main, so this merge request targets main. It is the top of the stack and merges last.
Closes #1719 (closed)