diff options
author | dormando <dormando@rydia.net> | 2020-04-12 01:26:58 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2020-04-12 01:26:58 -0700 |
commit | 3eb777302913799e94410f97750fb3df49e0f42e (patch) | |
tree | 579db4d7f24881c7e18f6695f35d776d95c070b5 /t/restart.t | |
parent | 0933764ed751f4654fe883a86f61ec3e0035d388 (diff) | |
download | memcached-3eb777302913799e94410f97750fb3df49e0f42e.tar.gz |
restart: fix failure on deleted chunked items
the classid is expected to be set correctly on freed memory.
Diffstat (limited to 't/restart.t')
-rw-r--r-- | t/restart.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/restart.t b/t/restart.t index 3439ad4..87823e7 100644 --- a/t/restart.t +++ b/t/restart.t @@ -69,6 +69,7 @@ diag "load enough items to change hash power level"; } diag "Load a couple chunked items"; +my $deleted_chunked_item = 0; { my $cur = 768000; my $cnt = 0; @@ -82,6 +83,7 @@ diag "Load a couple chunked items"; } # delete the last one. $cnt--; + $deleted_chunked_item = $cnt; print $sock "delete chunk${cnt}\r\n"; like(scalar <$sock>, qr/DELETED/, "deleted $cnt from large chunked items"); } @@ -144,7 +146,9 @@ diag "low TTL item should be gone"; my $end = $cur + 1024; while ($cur <= $end) { my $val = 'x' x $cur; - mem_get_is($sock, 'chunk' . $cnt, $val); + if ($cnt != $deleted_chunked_item) { + mem_get_is($sock, 'chunk' . $cnt, $val); + } $cur += 50; $cnt++; } |