-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Question: Multiple iterators on a read-write transaction. #981
Comments
@elliotcourant Currently limiting factor is pending write map in transaction. It is not thread safe. |
I am trying to run two iterators but I don't think I will get the performance benefit that I thought that I would. I was mostly just curious about what the limiting factor was. Thank you very much! |
We could easily make the txn run iterators concurrently. Thread unsafe was just seemed simple enough for the utility when originally written. |
This adds support for multiple iterators during a read-write transaction. But iterators created in a read-write transaction will only be able to see writes that were performed before the iterator was created. Any writes that occur after the iterator is created will be invisible to the iterator. This references an issue I opened previously: hypermodeinc#981
This adds support for multiple iterators during a read-write transaction. But iterators created in a read-write transaction will only be able to see writes that were performed before the iterator was created. Any writes that occur after the iterator is created will be invisible to the iterator. This references an issue I opened previously: hypermodeinc#981
This adds support for multiple iterators during a read-write transaction. But iterators created in a read-write transaction will only be able to see writes that were performed before the iterator was created. Any writes that occur after the iterator is created will be invisible to the iterator. This references an issue I opened previously: hypermodeinc#981 Added a test case for using multiple concurrent iterators when inside a read-write transaction. Added a mutex around the reads array on the transaction to make sure that it is thread safe when it is being modified by potentially concurrent iterators.
This adds support for multiple iterators during a read-write transaction. But iterators created in a read-write transaction will only be able to see writes that were performed before the iterator was created. Any writes that occur after the iterator is created will be invisible to the iterator. This references an issue I opened previously: hypermodeinc#981 Added a test case for using multiple concurrent iterators when inside a read-write transaction. Added a mutex around the reads array on the transaction to make sure that it is thread safe when it is being modified by potentially concurrent iterators.
This adds support for multiple iterators during a read-write transaction. But iterators created in a read-write transaction will only be able to see writes that were performed before the iterator was created. Any writes that occur after the iterator is created will be invisible to the iterator. This references an issue I opened previously: hypermodeinc#981 Added a test case for using multiple concurrent iterators when inside a read-write transaction. Added a mutex around the reads array on the transaction to make sure that it is thread safe when it is being modified by potentially concurrent iterators.
This adds support for multiple iterators during a read-write transaction. The iterators created in a read-write transaction will only be able to see writes that were performed before the iterator was created. Any writes that occur after the iterator is created will be invisible to the iterator. Fixes #981
This adds support for multiple iterators during a read-write transaction. The iterators created in a read-write transaction will only be able to see writes that were performed before the iterator was created. Any writes that occur after the iterator is created will be invisible to the iterator. Fixes hypermodeinc/badger#981
What version of Go are you using (
go version
)?What version of Badger are you using?
master @ 74ed6da
What is the limiting factor of the transaction or iterator object being thread-safe? Is it the pending writes map/iterator that isn't safe if there are multiple iterators at the same time as data being written?
I'm trying to run two iterators on a transaction after some entries have been written, but while the two iterators are active no writes will occur. If the limiting factor is writes cannot happen while multiple iterators are active would it be reasonable to simply restrict writes until iterators are deallocated?
Sorry if I'm misunderstanding the issue; trying to understand the workings with that object to better approach my problem.
Also sorry if this is not the correct venue for this question. I'm happy to move it if it is.
The text was updated successfully, but these errors were encountered: