shard: VRT_fail for out-of-workspace errors

parent 2c47803e
...@@ -106,7 +106,7 @@ shard_change_get(VRT_CTX, struct vmod_priv *priv, ...@@ -106,7 +106,7 @@ shard_change_get(VRT_CTX, struct vmod_priv *priv,
change = WS_Alloc(ctx->ws, sizeof(*change)); change = WS_Alloc(ctx->ws, sizeof(*change));
if (change == NULL) { if (change == NULL) {
shard_err0(ctx, shardd, "could not get workspace"); VRT_fail(ctx, "could not get workspace");
return (NULL); return (NULL);
} }
...@@ -138,8 +138,7 @@ shard_change_task_add(VRT_CTX, struct shard_change *change, ...@@ -138,8 +138,7 @@ shard_change_task_add(VRT_CTX, struct shard_change *change,
task = WS_Alloc(ctx->ws, sizeof(*task)); task = WS_Alloc(ctx->ws, sizeof(*task));
if (task == NULL) { if (task == NULL) {
shard_err0(ctx, change->shardd, VRT_fail(ctx, "could not get workspace for task");
"could not get workspace for task");
return (NULL); return (NULL);
} }
INIT_OBJ(task, SHARD_CHANGE_TASK_MAGIC); INIT_OBJ(task, SHARD_CHANGE_TASK_MAGIC);
...@@ -168,8 +167,7 @@ shard_change_task_backend(VRT_CTX, ...@@ -168,8 +167,7 @@ shard_change_task_backend(VRT_CTX,
b = WS_Alloc(ctx->ws, sizeof(*b)); b = WS_Alloc(ctx->ws, sizeof(*b));
if (b == NULL) { if (b == NULL) {
shard_err(ctx, shardd, ".%s_backend() WS_Alloc() failed", VRT_fail(ctx, "could not get workspace for change");
task_e == ADD_BE ? "add" : "remove");
return (NULL); return (NULL);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment