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

Handle transitive calls from a nonexclusive method #719

Merged
merged 5 commits into from
Jul 17, 2024

Conversation

tilk
Copy link
Member

@tilk tilk commented Jul 3, 2024

Fixes #717.

@tilk tilk added bug Something isn't working transactions Transaction framework labels Jul 3, 2024
Copy link
Contributor

@xThaid xThaid left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!

Comment on lines 156 to 161
if (
transaction1 is not transaction2
and not transactions_exclusive(transaction1, transaction2)
and method in method_map.exclusive_methods_by_transaction[transaction1]
and method in method_map.exclusive_methods_by_transaction[transaction2]
):
Copy link
Member

Choose a reason for hiding this comment

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

In the case like

T1 ------------------------> NORMAL
T2 -> NONEXCLUSIVE ---------/

T1 should conflict with T2. But because NORMAL is not in the exclusive_methods_by_transaction[T2], it doesn't. I modified the tests, and both transactions execute at the same time. Am I doing/understanding something incorrectly, or there is a problem?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is a problem, thanks for noticing that.

@tilk tilk marked this pull request as draft July 5, 2024 10:51
@tilk tilk force-pushed the tilk/nonexclusive-transitivity branch from 0d5b4b8 to 68c00bb Compare July 17, 2024 12:45
@tilk tilk marked this pull request as ready for review July 17, 2024 12:54
@tilk tilk requested a review from piotro888 July 17, 2024 12:55
@tilk tilk requested a review from lekcyjna123 July 17, 2024 12:56
@tilk tilk merged commit 4c97402 into master Jul 17, 2024
13 checks passed
@tilk tilk deleted the tilk/nonexclusive-transitivity branch July 17, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working transactions Transaction framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nonexclusivity of methods should be transitive
4 participants