Plumb errors through TransactionStatusService instead of panicking #3236
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
I was reviewing #3026 post-merge and noticed we had a handful of
.expect()
and.unwrap()
inTransactionStatusService
. These do not allow for graceful teardown of the process, so try to be nicer to other threads by initiating a more graceful teardownSummary of Changes
.expect()
and.unwrap()
One additional item I'll call out is that the panic hook pretty quickly kills the entire process via this:
agave/metrics/src/metrics.rs
Lines 538 to 539 in 7b05e29
The sentiment behind that comment is still valid. However, enough threads respect the exit flag such that the process will still come down fairly quickly so I think setting the flag is ok in this scenario