-
Notifications
You must be signed in to change notification settings - Fork 216
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
AttributeError: asgiref.local._CVar object has no attribute 'value' #485
Comments
@carltongibson -- do you have any opinions about a potential fix + validation of that fix here? Basically related to:
From reading the docstring on
If this is true, to me this implies multiple threads? (actually confused here about what scenario threadsafety is referring to here, multiple threads sharing the context of an async task?) can call
And storage's
So if two threads? try to delete the same attribute, one is going to win and one is going to error, even though the operation is properly locked. It seems like it should be pretty harmless to just let a second delete go through here without error? Though seemingly the standard behavior of |
Running the latest
main
(abc69a054aa440ef42c939b5a197df05c3ad48d2
) in production to test a fix for #467, I see this error somewhat frequently across a wide spread of our requests/endpoints. This error was frequent enough that I reverted back to the old version which errors in a different way less frequently like #467.Not really sure why
__delattr__
in_CVar
needs to throw if we try to delete an attribute that doesn't exist. Does this indicate a programming/synchronization bug somewhere or is this just a bit over-restricting? Not sure if this is bug prevention or its just fine.Happy to test any further improvements/fixes here to try and get a release which doesn't have errors. Can also provide any additional info that might be helpful here if need be.
Relevant versions:
Stack trace (all failures are basically the same):
The text was updated successfully, but these errors were encountered: