Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit ad2a668

Browse files
committed
fetch: Atomically capture stale_oc state
It should be safe as it was because there shouldn't be a transition from BOS_FINISHED to BOS_FAILED, but now that it can be atomic, it should not only be safe but also future-proof. It originally matched ignore_state from the coccinelle patch because of the separate boc variable, and had to be manually edited.
1 parent c7e5ad5 commit ad2a668

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

bin/varnishd/cache/cache_fetch.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,7 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
886886
VSLb(bo->vsl, SLT_Notice,
887887
"vsl: Conditional fetch wait for streaming object");
888888
/* XXX: We should have a VCL controlled timeout here */
889-
(void)ObjWaitState(stale_oc, BOS_FINISHED);
890-
stale_state = stale_boc->state;
889+
stale_state = ObjWaitState(stale_oc, BOS_FINISHED);
891890
HSH_DerefBoc(bo->wrk, stale_oc);
892891
stale_boc = NULL;
893892
if (stale_state != BOS_FINISHED) {

0 commit comments

Comments
 (0)