ApiError: Unexpected error: No transaction to rollback
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start by tracing the rollback flow through error.rs, db_impl.rs, and transaction.rs, especially the transaction creation and final rollback paths shown in the Sentry trace. Check the existing rollback implementations and their error handling. Done means a failed transaction creation no longer produces an unexpected "No transaction to rollback" API error, with behavior covered by the relevant tests.
Written by the indexing model from the issue text.
Description
Sentry Issue: SYNCSTORAGE-RS-HE
File "error.rs", line 95, in syncstorage_spanner::error::DbError::from
File "error.rs", line 46, in syncstorage_spanner::error::DbError::internal
File "db_impl.rs", line 190, in syncstorage_spanner::db::db_impl::<T>::rollback::{{closure}}
File "transaction.rs", line 67, in syncserver::web::transaction::DbTransactionPool::transaction_internal::{{closure}}
File "transaction.rs", line 156, in syncserver::web::transaction::DbTransactionPool::transaction_http::{{closure}}
...
(86 additional frame(s) were not displayed){code}
This occurs when there was an error creating a transaction, so the final `rollback` has nothing to do. We should have our `rollback` impls either return a specific error in this case that we can safely ignore (such as [e.g. diesel does|https://docs.rs/diesel/latest/diesel/result/enum.Error.html#variant.NotInTransaction]) or treat the rollback as a noop (which e.g. [sqlalchemy does|https://docs.sqlalchemy.org/en/21/orm/session_api.html#sqlalchemy.orm.Session.rollback]).
Issue is synchronized with a [GitHub Issue|https://github.com/mozilla-services/syncstorage-rs/issues/2485]
┆Issue is synchronized with this Jira Task
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 86
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mozilla-services/syncstorage-rs
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
mozilla-services/syncstorage-rs#2587 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
mozilla-services/syncstorage-rs#2586 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
mozilla-services/syncstorage-rs#2579 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
mozilla-services/syncstorage-rs#2577 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
mozilla-services/syncstorage-rs#2576 · 2 comments ·
All issues in mozilla-services/syncstorage-rs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100