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

race condition in poll_for_notes during active transaction #35

Open
jb55 opened this issue Jul 22, 2024 · 0 comments
Open

race condition in poll_for_notes during active transaction #35

jb55 opened this issue Jul 22, 2024 · 0 comments

Comments

@jb55
Copy link
Contributor

jb55 commented Jul 22, 2024

We can actually receive processed notes during a transaction, but that active transaction does not have a view of the new notes, so when you try to read the note data it won't be there.

To reproduce:

  1. open a txn

  2. poll for notes

  3. try to query for that note, it won't be there! because we opened a txn and a new txn came in after we opened the txn. I have seen this a few times when loading lots of notes quickly.

Not sure what the best solution for this is...

jb55 added a commit to damus-io/notedeck that referenced this issue Aug 3, 2024
we should fix the race condition though

Link: damus-io/nostrdb#35
Signed-off-by: William Casarin <[email protected]>
jb55 added a commit to damus-io/notedeck that referenced this issue Aug 3, 2024
we should fix the race condition though

Link: damus-io/nostrdb#35
Signed-off-by: William Casarin <[email protected]>
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

No branches or pull requests

1 participant