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

Potential Race Condition on Semaphoring Switcher Protocol #8

Open
kory33 opened this issue Dec 10, 2022 · 1 comment
Open

Potential Race Condition on Semaphoring Switcher Protocol #8

kory33 opened this issue Dec 10, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@kory33
Copy link
Member

kory33 commented Dec 10, 2022

The protocol described here

* | ===[2]===> | | |
* | | | |
* | "data being saved" |
* | ==============[3]==============> |
* | | | |
* | [Saves data] | |
* [holds p's ] [associated] | |
* [connection] [ with p ] | |
* | | "data saved" |
* | | >>>>>>>[4]>>>>>>> |

potentially introduces a race condition because BungeeCord plugin (this is us) may initiate the Redis request after Spigot plugin has reported to Redis the completion of the data persistence (although this is very unlikely).

We can avoid this problem by having the "step 3" done before "step 2", since Redis then serializes write requests in the desired order.

@kory33 kory33 added the bug Something isn't working label Dec 10, 2022
@kory33
Copy link
Member Author

kory33 commented Dec 10, 2022

Actually, the issue does not exist. Implementation is entirely correct, and it is just the documentation having the sequence diagram wrong.

@kory33 kory33 added documentation Improvements or additions to documentation and removed bug Something isn't working labels Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant