-
Notifications
You must be signed in to change notification settings - Fork 378
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
Simple storage: Finalize busy object state also for ObjFreeObj() #3954
Simple storage: Finalize busy object state also for ObjFreeObj() #3954
Conversation
How hard would it be to create a test case? |
We would need another storage engine which occupies BTW, it's nice that you picked up the |
ea44b0b
to
54e9121
Compare
bugwash participants would like to get @mbgrydeland\ 's opinion, but I actually think we should be fine:
|
54e9121
to
0308f7d
Compare
Isn't this patch introducing a race? Also isn't the whole patch kind of a noop? The freeing/clearing would happen on the boc dereference eventually, so is there a specific need to have it dont early? And if so, that clearing should be happening in |
Reading the ticket description, I guess my noop-argument is false. But my fear of an introduced race persists. |
I think a cleaner solution would be to introduce a |
re @mbgrydeland
No. The single call site of
By convention *1, objects are not added to an LRU before Secondly, at this point in our current code, a non-private objcore has at least two references, one owned by the boc and one held by the fetch code, and LRU only considers objcores with exactly one reference. To give you more confidence, the test suite also passes with this additional commit, which, however, I would not want to add to the code because it feels brittle to me.
No and yes. Because we might (and, by default *2, do) change the storage engine for the synthetic response generated in So it is only kind of a noop for the special case where the storage engine stays the same across all of the backend side processing (that is, the storage engine selected for regular responses is the same as
This is where I coming from. I wrote this patch with the proposed Stevedore API function *1) I am referring here to the fact that many details of the stevedore API are not documented explicitly, but rather by example of the reference implementation in Varnish-Cache. *2) Transient storage is, by default, implicitly selected through the following events: For a typical return from edit: The additional refcnt assertion is only valid for non-private objects |
Oh, and I forgot: Thank you for your review, @mbgrydeland ! |
0308f7d
to
2568eb3
Compare
2568eb3
to
8773a28
Compare
8773a28
to
f5877ec
Compare
f5877ec
to
3d90332
Compare
Thanks @nigoroll , your detailed explanation has peaced my mind. I have no issues with this patch. |
If oc->boc is not NULL for an ObjFreeObj() call, the stevedore needs to finish any busy object transaction. Fixes varnishcache#3953
3d90332
to
7ef1f94
Compare
If
oc->boc
is notNULL
for anObjFreeObj()
call, the stevedore needs to finish any busy object transaction.Please see bug ticket for a more detailed explanation.
Fixes #3953