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

Possible race condition in the publish log causing a forked feed #292

Closed
KyleMaas opened this issue Jan 2, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@KyleMaas
Copy link
Contributor

KyleMaas commented Jan 2, 2023

Basically an internalized version of the problem encountered in #289:

seq := pl.byAuthor.Seq()

When publishing a new message, the previous sequence number query relies on the author log being in sync with the main log. The problem is that this seems to not always be the case. I suspect this is related to #251, although I don't know the details of how multilogs are implemented internally to know for sure.

One way or another, it's difficult but likely not impossible (as we saw in #289) for this to trigger a wrong sequence number result, which would in turn result in a wrong query of the main log for the previous message, which would in turn cause a forked feed.

This should be possible to trigger by publishing a huge number of messages posted by the same author in quick succession so that the main feed gets ahead of pl.byAuthor.

@KyleMaas
Copy link
Contributor Author

I've got a fix for this, but we still need a test that tests for this specifically so we can prove that it stays fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants