[6.0] 3e8316c21 shard: VRT_fail for out-of-workspace errors
Reza Naghibi
reza at naghibi.com
Wed Aug 19 13:17:07 UTC 2020
commit 3e8316c2109cc19effc64054ecd6b71178652aa2
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Jun 10 09:18:21 2020 +0200
shard: VRT_fail for out-of-workspace errors
diff --git a/lib/libvmod_directors/shard_cfg.c b/lib/libvmod_directors/shard_cfg.c
index 006c27ca6..e08fd8ca3 100644
--- a/lib/libvmod_directors/shard_cfg.c
+++ b/lib/libvmod_directors/shard_cfg.c
@@ -105,7 +105,7 @@ shard_change_get(VRT_CTX, struct vmod_priv *priv,
change = WS_Alloc(ctx->ws, sizeof(*change));
if (change == NULL) {
- shard_err0(ctx, shardd, "could not get workspace");
+ VRT_fail(ctx, "could not get workspace");
return (NULL);
}
@@ -137,8 +137,7 @@ shard_change_task_add(VRT_CTX, struct shard_change *change,
task = WS_Alloc(ctx->ws, sizeof(*task));
if (task == NULL) {
- shard_err0(ctx, change->shardd,
- "could not get workspace for task");
+ VRT_fail(ctx, "could not get workspace for task");
return (NULL);
}
INIT_OBJ(task, SHARD_CHANGE_TASK_MAGIC);
@@ -167,8 +166,7 @@ shard_change_task_backend(VRT_CTX,
b = WS_Alloc(ctx->ws, sizeof(*b));
if (b == NULL) {
- shard_err(ctx, shardd, ".%s_backend() WS_Alloc() failed",
- task_e == ADD_BE ? "add" : "remove");
+ VRT_fail(ctx, "could not get workspace for change");
return (NULL);
}
More information about the varnish-commit
mailing list