-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Initial Code to reduce parallel.Client caching #2340
Conversation
Can you tweak it so that purge_hub_results and purge_local_results are called by |
I would argue against this: it would be confusing to have two different "interfaces" (hub "results" and client "cache") merged into in here and that replacing the original one: What would I would be more in favor to add a deprecation warning to the old Anyway: If you want to have a certain interface I have no problem implementing it. :-) |
There are two reasons for this:
So the choice is either A) two methods with identical signatures for purging local and remote result caches Honestly, I think both, where the existing The Hub is a cache of finished results, just like the local dict. It just happens to be remote. Purging results is really just saying "I'm done with this data, and I don't want it taking up resources anymore". It's only a question of whose resources you want to stop taking up. The Client's, the Hub's, or both? I can think of no reason that dealing with the two should be different.
It should remove just those IDs from the local cache. If you want to keep the current call (purge local cache, history and all) as something like |
Ok, will do. After trying to understand the client-controller connections I would actually rename So my idea would be
Also change the docstrings to "purge the cached results" so that it is clear that it is a cache of already computed results. |
On Wed, Aug 29, 2012 at 2:40 PM, JanSchulz notifications@github.com wrote:
|
The new methods clear the cached values and free some memory. The whole thing is split into different methods to both clear the client and the hub side. Additionally fix some bugs in other parts of the code.
Signed-off-by: Jan Schulz <jasc@gmx.net>
All Tests which access the hub history fail with an error. I've no idea why :-(
|
If the inputs are empty, no msg_ids should be returned. So change the test to not only check for None but also for empty lists. Signed-off-by: Jan Schulz <jasc@gmx.net>
I think we haven't seen you posted a commit that fixed the test. |
From my understanding the error comes from something in the hub history lookup code on the hub side, not from something in the client code: the exception is also in untouched codepaths (by this patches) and before any new code is called during this test case (side effect from other test cases due to "recycling" of the hub side?) Unfortunately I have no idea how to debug this as I can't see where this error is raised. :-( Is there any way to get at the stacktrace of the exception on the hub side? |
Trying to revive old PRs. Should we do something in particular with this one ? assign someone ? |
I'll pick up review in a week or so, just wrapping some things up right now. Assigning to myself. |
This looks good to me, thanks for your patience @JanSchulz! @JanSchulz if you don't have anything more to add here, |
I'm fine. Thanks for your help and comments with this PR! |
Initial Code to reduce parallel.Client caching adds: client.purge_local_results client.purge_hub_results client.purge_results (does both above) client.purge_everything (includes history, etc.)
Initial Code to reduce parallel.Client caching adds: client.purge_local_results client.purge_hub_results client.purge_results (does both above) client.purge_everything (includes history, etc.)
See #1131 for the discussion
Up to now it only adds a purge_client_cache() method and fixes two minor bugs.
This is probably not merge ready!