Skip to content

Conversation

@Shubham8287
Copy link
Contributor

Description of Changes

Depends on #3968.

Makes MutTxId, !Send to avoid being deadlocked by holding it across await points
after taking learnings from #3938 and #3968.

API and ABI breaking changes

NA

Expected complexity level and risk

1, It only increases the compile time safety.

Testing

Existing should be enough.

let reschedule = delete_scheduled_function_row(Some(tx), Some((timestamp, instant)));
};

// Below code is outside of the DB transaction scope because the
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this code has to be refactored only to make compiler believe that it doesn't hold tx across await, whcih were already not happening here.

/// such as:
/// https://github.com/clockworklabs/SpacetimeDB/pull/3938 and
/// https://github.com/clockworklabs/SpacetimeDB/pull/3968.
unsafe impl Send for InstanceEnv {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Very helpful comment. I still have some reservations about having to mark this unsafe.

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.

3 participants