[master] 776b67400 objcore: Rename the ABANDON flag to CANCEL
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon May 17 12:00:08 UTC 2021
commit 776b67400ebd97a3ea29466e2354853a0098d61a
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon May 17 13:57:29 2021 +0200
objcore: Rename the ABANDON flag to CANCEL
This is to avoid a confusion between cancelling a fetch from a client
transaction and abandoning a fetch from a backend transaction.
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 273eeb16b..8c641e5e4 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -571,7 +571,7 @@ vbf_stp_fetchbody(struct worker *wrk, struct busyobj *bo)
est = 0;
do {
- if (oc->flags & OC_F_ABANDON) {
+ if (oc->flags & OC_F_CANCEL) {
/*
* A pass object and delivery was terminated
* We don't fail the fetch, in order for HitMiss
diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 2855c71e9..d9a4e0c69 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -763,11 +763,11 @@ HSH_Fail(struct objcore *oc)
}
/*---------------------------------------------------------------------
- * Abandon a fetch we will not need
+ * Mark a fetch we will not need as cancelled
*/
static void
-hsh_abandon(struct objcore *oc)
+hsh_cancel(struct objcore *oc)
{
struct objhead *oh;
@@ -776,7 +776,7 @@ hsh_abandon(struct objcore *oc)
CHECK_OBJ(oh, OBJHEAD_MAGIC);
Lck_Lock(&oh->mtx);
- oc->flags |= OC_F_ABANDON;
+ oc->flags |= OC_F_CANCEL;
Lck_Unlock(&oh->mtx);
}
@@ -807,7 +807,7 @@ HSH_Cancel(struct worker *wrk, struct objcore *oc, struct boc *boc)
AN(oc->flags & OC_F_HFM);
if (boc != NULL) {
- hsh_abandon(oc);
+ hsh_cancel(oc);
ObjWaitState(oc, BOS_FINISHED);
}
diff --git a/include/tbl/oc_flags.h b/include/tbl/oc_flags.h
index 6bde9d19e..9a37335f2 100644
--- a/include/tbl/oc_flags.h
+++ b/include/tbl/oc_flags.h
@@ -34,7 +34,7 @@ OC_FLAG(PURGED, purged, (1<<0)) //lint !e835
OC_FLAG(BUSY, busy, (1<<1))
OC_FLAG(HFM, hfm, (1<<2))
OC_FLAG(HFP, hfp, (1<<3))
-OC_FLAG(ABANDON, abandon, (1<<4))
+OC_FLAG(CANCEL, cancel, (1<<4))
OC_FLAG(PRIVATE, private, (1<<5))
OC_FLAG(FAILED, failed, (1<<6))
OC_FLAG(DYING, dying, (1<<7))
More information about the varnish-commit
mailing list