-
Notifications
You must be signed in to change notification settings - Fork 236
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
Use retry with split in GpuCachedDoublePassWindowIterator #8476
Conversation
build |
build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I didn't finish the review. Will look at it more soon once I fix the other places that we are trying to use withRetry in a way that is not going to close the Iterator that is returned.
@@ -1694,6 +1696,12 @@ class GpuCachedDoublePassWindowIterator( | |||
|
|||
waitingForFirstPass.foreach(_.close()) | |||
waitingForFirstPass = None | |||
|
|||
firstPassIter.foreach(_.foreach(_._1.foreach(_.close()))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we pulling off of the results from the iterators to close them? This is not common unless the Iterators are backed by a cache. But then why have it be an Iterator instead of a List or ArrayBuffer or something like that.
Are we risking leaking data if the retry iterator is not fully drained? If so then there are a number of other bugs that we need to fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I filed #8482 for this. Could you add a comment here about it so that we can find a better way to clean this up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this code is okay, but I think we could make it much cleaner if we had a better way to close the iterators and divide things up into sub-iterators. Perhaps it would be better to wait until 23.08 and we have fixed the leak that you are worried about.
Sounds good. I have moved this to draft for now. |
build |
Closes #8388
This PR updates GpuCachedDoublePassWindowIterator to use retry with splits for pre and post-processing.