!37 [sync] PR-32: meta: fix meta delete
From: @openeuler-sync-bot Reviewed-by: @wk333 Signed-off-by: @wk333
This commit is contained in:
commit
68d0287d34
35
fix-meta-delete.patch
Normal file
35
fix-meta-delete.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 6c4152b636ca7fffe2dd0eb1ddcb3141a303533a Mon Sep 17 00:00:00 2001
|
||||
From: dormando <dormando@rydia.net>
|
||||
Date: Wed, 15 Dec 2021 16:01:45 -0800
|
||||
Subject: [PATCH] meta: fix meta delete
|
||||
|
||||
compared cas token was always zero...
|
||||
|
||||
---
|
||||
proto_text.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/proto_text.c b/proto_text.c
|
||||
index 000ddd1..ddad087 100644
|
||||
--- a/proto_text.c
|
||||
+++ b/proto_text.c
|
||||
@@ -1538,7 +1538,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;
|
||||
@@ -1598,7 +1597,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);
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
Name: memcached
|
||||
Version: 1.6.12
|
||||
Release: 2
|
||||
Release: 3
|
||||
Epoch: 0
|
||||
Summary: A high-performance, distributed memory object caching system
|
||||
License: GPL-2.0+
|
||||
@ -17,6 +17,7 @@ Source1: https://releases.pagure.org/memcached-selinux/memcached-selinux-1
|
||||
Source2: memcached.sysconfig
|
||||
|
||||
Patch0001: memcached-unit.patch
|
||||
Patch0002: fix-meta-delete.patch
|
||||
|
||||
BuildRequires: systemd perl-generators perl(Test::More) perl(Test::Harness)
|
||||
BuildRequires: selinux-policy-devel libevent-devel make gcc
|
||||
@ -62,6 +63,7 @@ optimised for use with this version of memcached.
|
||||
%prep
|
||||
%setup -q -b 1
|
||||
%patch1 -p1 -b .unit
|
||||
%patch2 -p1 -b .delete
|
||||
|
||||
%build
|
||||
%configure \
|
||||
@ -144,6 +146,9 @@ fi
|
||||
%{_mandir}/man1/memcached.1*
|
||||
|
||||
%changelog
|
||||
* Fri May 31 2024 yanshuai <yanshuai01@kylinos.cn> - 0:1.6.12-3
|
||||
- meta: fix meta delete
|
||||
|
||||
* Mon Jan 10 2022 xu_ping <xuping33@huawei.com> - 0:1.6.12-2
|
||||
- Use policycoreutils-python3 to fix install failed
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user