summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2021-12-15 16:01:45 -0800
committerdormando <dormando@rydia.net>2022-01-12 14:04:32 -0800
commit6c4152b636ca7fffe2dd0eb1ddcb3141a303533a (patch)
treef4c42da149c76a43a907b79c79d63ba14ac4abb2
parent706d47e26a755df0141f306d4ae2da5c1d815fdb (diff)
downloadmemcached-6c4152b636ca7fffe2dd0eb1ddcb3141a303533a.tar.gz
meta: fix meta delete
compared cas token was always zero...
-rw-r--r--proto_text.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/proto_text.c b/proto_text.c
index f544a70..086fa39 100644
--- a/proto_text.c
+++ b/proto_text.c
@@ -1551,7 +1551,6 @@ error:
static void process_mdelete_command(conn *c, token_t *tokens, const size_t ntokens) {
char *key;
size_t nkey;
- uint64_t req_cas_id = 0;
item *it = NULL;
int i;
uint32_t hv;
@@ -1611,7 +1610,7 @@ static void process_mdelete_command(conn *c, token_t *tokens, const size_t ntoke
MEMCACHED_COMMAND_DELETE(c->sfd, ITEM_key(it), it->nkey);
// allow only deleting/marking if a CAS value matches.
- if (of.has_cas && ITEM_get_cas(it) != req_cas_id) {
+ if (of.has_cas && ITEM_get_cas(it) != of.req_cas_id) {
pthread_mutex_lock(&c->thread->stats.mutex);
c->thread->stats.delete_misses++;
pthread_mutex_unlock(&c->thread->stats.mutex);