-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix abort-on-error behaviour of transactions #2593
Conversation
This will allow the direct allocation in ostree_repo_prepare_transaction() to be replaced with a call to this function, avoiding breaking encapsulation. Signed-off-by: Simon McVittie <smcv@collabora.com>
Previously, the reference count was left uninitialized as a result of bypassing the constructor, and the intended abort-on-error usually wouldn't have happened. Fixes: 8a9737a "repo/private: move OstreeRepoAutoTransaction to a boxed type" Resolves: ostreedev#2592 Signed-off-by: Simon McVittie <smcv@collabora.com>
Hi @smcv. Thanks for your PR. I'm waiting for a ostreedev member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I think this is ready for review, but I'm marking it as a draft while I see whether it fixes the CI for flatpak/flatpak#4326. |
/ok-to-test |
/approve |
I think this is right, but I won't know whether it fixed my failing CI for at least another hour (running the Flatpak test-suite under valgrind is slow). https://github.com/flatpak/flatpak/runs/6240039656?check_suite_focus=true |
The Flatpak test-suite has finally passed under valgrind, and yes, a backport of these commits to 2022.2 does resolve the test failure. |
repo: Factor out _ostree_repo_auto_transaction_new()
This will allow the direct allocation in
ostree_repo_prepare_transaction() to be replaced with a call to this
function, avoiding breaking encapsulation.
repo: Correctly initialize refcount of temporary transaction
Previously, the reference count was left uninitialized as a result of
bypassing the constructor, and the intended abort-on-error usually
wouldn't have happened.
Fixes: 8a9737a "repo/private: move OstreeRepoAutoTransaction to a boxed type"
Resolves: OstreeRepoAutoTransaction used with uninitialized refcount in ostree_repo_prepare_transaction() #2592