Skip to content
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

Log new object versions immediately after creation #1007

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

senderista
Copy link
Contributor

gaia_ptr_t::create() and gaia_ptr_t::update_payload() had a bug introduced when the autoconnect feature was added: the version just created would have its old offset saved but was logged after the autoconnect logic had executed, with the saved offset. If the autoconnect logic had created a new version, this would end up logging another version with the same "new" version (the one created by autoconnect), but using the "old" version corresponding to the offset saved before the original updated version was created. Therefore, the txn log contained two versions with the same "new" version but different "old" versions, which manifested as an attempted double-free (due to the duplicated "new" version), which was caught by an assert added in #889. That assert fired in the SDK test test_connect_disconnect.disconnect_delete (https://gaiaplatform.atlassian.net/browse/GAIAPLAT-1501), and also in a test run of the amr_swarm app (https://gaiaplatform.atlassian.net/browse/GAIAPLAT-1518).

Copy link
Contributor

@simone-gaia simone-gaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@senderista senderista merged commit 52f619c into master Oct 12, 2021
@senderista senderista deleted the tobin/fix_txn_logging branch October 12, 2021 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants