-
Notifications
You must be signed in to change notification settings - Fork 292
Optionally flush container builders #668
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
Conversation
|
I think in principle a good idea, but we should discuss the name! At least, |
|
Changed the name of the function to |
frankmcsherry
left a comment
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.
Seems good in spirit, but have a few nits about the API. Mostly being clear exactly what relax should do, and making sure it does this in the one implementation.
Gives container builders the option to drop their allocations in flush in exchange. Other places might benefit from this, too, but exchange has a quadratic number of builders, so not dropping large allocations is can cause a memory regression. Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
frankmcsherry
left a comment
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.
Good to merge once green!
Signed-off-by: Moritz Hoffmann <[email protected]>
Flush container builders in exchange channels and session buffers, if they need to. This avoids a problem where we'd have a quadratic amount of lingering memory in the exchange channel. The change adds a
relaxfunction to container builders, which by default does nothing. Container builders can use it to release resources when called, and Timely calls it when it believes it's a good moment to flush. This corresponds to pushing aNonevalue, which happens once an operator ceases to produce data.I don't like the solution very much because it seems to conflate different concepts, but it seems like a small API change without too much negative impact.
Edit: changed the name from
flushtorelaxfor the lack of a better term.