-
Notifications
You must be signed in to change notification settings - Fork 178
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
HashClient._set_many() fails to report failures #353
Comments
@martinnj thoughts? |
It's been a hot minute since I wrote that PR.
There is a little discussion about it in #320, but don't mind giving it a once over, and seeing if I missed something. I'll hopefully have time tomorrow. |
@jogo : I've dug into the code again. The long answer So two unit-tests where changed in #320, one of the relate to the semantics described above, I'll just go over both to make it clear what I'm talking about:
TLDR So the solution to this issue is to make the Extra It also looks like pymemcache/pymemcache/client/hash.py Lines 90 to 104 in 25e38df
|
@martinnj Thanks for the deep and enlightening analysis. This explains a lot. I would prefer that, in cases where a whole operation on a specific client fails, all the keys for that client are marked as failed; I understand that |
Following the fix of #319 in #320,
set_many()
does not return a list of failed keys like it used to, whenignore_exc
is True.This was detected by the tests, but instead of fixing the code, #320 includes a change to the tests, to mark the new behavior as valid.
With the old code, when exceptions are ignored, we still get a boolean value reporting the success of each operation, and the keys to be set are properly collected into their proper lists.
For the new code, there is only one
set_many()
operation. I submit that the correct semantics, whenignore_exc
isTrue
and the underlying operation still raised an exception, is to still avoid raising, but return all the keys in thefailed
collection, not thesucceeded
one.The text was updated successfully, but these errors were encountered: