-
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
More than one iterator? #548
Comments
That doesn't make any sense. Use concurrent transactions, not iterators. If you need write transaction then simply chan the logic. |
OK. I'd use that. How about the "Unclosed Iterator" that I didn't open? How does that happen. I track every opening and closing and I don't see any unclosed iterator from my side. |
See this: #522 It could be that you're discarding the transaction before closing iterator. Try to see if you can find some ordering issue in your code, potentially by checking defers. |
I created a struct which contains my transaction and iterator. Whenever discard is called, I close the iterator and I get error. |
Collins - just use defer iterator.Close() within transaction and you should be fine. seems you have logic ordering issue, this should take care of it. |
Okay, Thanks. |
I have an implementation that uses iterators concurrently. Is there a way to achieve this since I can only open on iterator? I also get an error that an iterator wasn’t closed but I assigned a uuid to every transaction and I printed it out when iterators are opened and closed. Every iterator seems closed but I still get the error
The text was updated successfully, but these errors were encountered: