FIX: add ENGINE_ENOMEM error code handling
@@ -2538,7 +2538,8 @@ static void process_bop_mget_complete(conn *c)
else sprintf(resultptr, " %s\r\n", "BKEY_MISMATCH");
}
else {
- break; // ENGINE_DISCONNECT or SEVERE error
+ /* ENGINE_ENOMEM or ENGINE_DISCONNECT or SERVER error */
+ break;
}
if ((add_iov(c, valuestrp, nvaluestr) != 0) ||
@@ -2588,7 +2589,7 @@ static void process_bop_mget_complete(conn *c)
default:
STATS_NOKEY(c, cmd_bop_mget);
if (ret == ENGINE_EBADVALUE) out_string(c, "CLIENT_ERROR bad data chunk");
- else if (ret == ENGINE_ENOMEM) out_string(c, "SERVER_ERROR out of memory writing get response");
+ else if (ret == ENGINE_ENOMEM) out_string(c, "SERVER_ERROR out of memory");
else if (ret == ENGINE_ENOTSUP) out_string(c, "NOT_SUPPORTED");
else handle_unexpected_errorcode_ascii(c, ret);
}
@@ -10081,6 +10082,7 @@ static void process_lop_get(conn *c, char *key, size_t nkey,
STATS_NOKEY(c, cmd_lop_get);
if (ret == ENGINE_EBADTYPE) out_string(c, "TYPE_MISMATCH");
else if (ret == ENGINE_ENOTSUP) out_string(c, "NOT_SUPPORTED");
+ else if (ret == ENGINE_ENOMEM) out_string(c, "SERVER_ERROR out of memory");
else handle_unexpected_errorcode_ascii(c, ret);
}
}
@@ -10497,6 +10499,7 @@ static void process_sop_get(conn *c, char *key, size_t nkey, uint32_t count,
STATS_NOKEY(c, cmd_sop_get);
if (ret == ENGINE_EBADTYPE) out_string(c, "TYPE_MISMATCH");
else if (ret == ENGINE_ENOTSUP) out_string(c, "NOT_SUPPORTED");
+ else if (ret == ENGINE_ENOMEM) out_string(c, "SERVER_ERROR out of memory");
else handle_unexpected_errorcode_ascii(c, ret);
}
}
@@ -10896,6 +10899,7 @@ static void process_bop_get(conn *c, char *key, size_t nkey,
if (ret == ENGINE_EBADTYPE) out_string(c, "TYPE_MISMATCH");
else if (ret == ENGINE_EBADBKEY) out_string(c, "BKEY_MISMATCH");
else if (ret == ENGINE_ENOTSUP) out_string(c, "NOT_SUPPORTED");
+ else if (ret == ENGINE_ENOMEM) out_string(c, "SERVER_ERROR out of memory");
else handle_unexpected_errorcode_ascii(c, ret);
}
}
