25659373 Update memcached to version 1.4.35
authorRich Burridge <rich.burridge@oracle.com>
Tue, 07 Mar 2017 11:53:48 -0800
changeset 7722 22eb8cfcabe7
parent 7721 71a889dd98fa
child 7723 d2568b4eed34
25659373 Update memcached to version 1.4.35
components/memcached/Makefile
components/memcached/patches/02-lru-maintainer.patch
components/memcached/patches/03-fix-build.patch
components/memcached/test/results-64.master
--- a/components/memcached/Makefile	Wed Mar 01 05:43:57 2017 -0800
+++ b/components/memcached/Makefile	Tue Mar 07 11:53:48 2017 -0800
@@ -26,15 +26,15 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		memcached
-COMPONENT_VERSION=	1.4.33
+COMPONENT_VERSION=	1.4.35
 COMPONENT_PROJECT_URL=	http://memcached.org/
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:83726c8d68258c56712373072abb25a449c257398075a39ec0867fd8ba69771d
+    sha256:f4815ac95aa06c0f360052a0a12010533b2b78c3bfe475b171606c1b61469476
 COMPONENT_ARCHIVE_URL=	http://memcached.org/files/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	database/memcached
 COMPONENT_ANITYA_ID=	1965
 
-TPNO=			32788
+TPNO=			34035
 
 include $(WS_MAKE_RULES)/common.mk
 
@@ -47,6 +47,11 @@
 
 CFLAGS += -D__ATTRIBUTE_DISABLED
 
+# If we don't define this, configure will try to use umem, which in turn will
+# cause BUILD_CACHE_TRUE to be set which will take us down a path such that
+# do_cache_alloc and do_cache_free are undefined symbols at link time.
+CONFIGURE_ENV +=	"ac_cv_header_umem_h=no"
+
 CONFIGURE_BINDIR.64 =	$(CONFIGURE_PREFIX)/lib
 CONFIGURE_OPTIONS.64 +=	--with-libevent=$(USRLIBDIR64)
 # The below works around a bug in configure/configure.ac that sets
@@ -58,8 +63,6 @@
 CONFIGURE_OPTIONS +=	--enable-dtrace --disable-docs --disable-coverage
 CONFIGURE_OPTIONS +=	--localstatedir=$(VARDIR)
 
-# lru-maintainer.t is inconsistent and usually fails.
-
 COMPONENT_TEST_TARGETS=	test
 
 # Just retain test result output that's useful.
--- a/components/memcached/patches/02-lru-maintainer.patch	Wed Mar 01 05:43:57 2017 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-Ignore lru-maintainer.t because it is inconsistent.
-Upstream is irresponsible https://groups.google.com/forum/#!topic/memcached/35wG9noM9rM
-
---- memcached-1.4.33/t/lru-maintainer.t.orig	2016-11-23 08:09:00.238033621 +0000
-+++ memcached-1.4.33/t/lru-maintainer.t	1969-12-31 16:00:00.000000000 +0000
-@@ -1,105 +0,0 @@
--#!/usr/bin/perl
--
--use strict;
--use warnings;
--use Test::More tests => 225;
--use FindBin qw($Bin);
--use lib "$Bin/lib";
--use MemcachedTest;
--
--# Regression test for underestimating the size of items after the large memory
--# change.
--my $server = new_memcached('-m 3 -o lru_maintainer,lru_crawler');
--my $sock = $server->sock;
--my $keystub = "X"x200;
--for (1 .. 15000) {
--    print $sock "set $keystub$_ 0 0 2 noreply\r\nok\r\n";
--}
--# There's probably already an error on the wire, so we'll see that.
--$keystub .= "20001";
--print $sock "set $keystub 0 0 2\r\nok\r\n";
--is(scalar <$sock>, "STORED\r\n", "stored key without OOM");
--
--# Basic tests
--$server = new_memcached('-m 6 -o lru_maintainer,lru_crawler');
--$sock = $server->sock;
--
--for (1 .. 10) {
--    print $sock "set ifoo$_ 0 1 2\r\nok\r\n";
--    is(scalar <$sock>, "STORED\r\n", "stored key");
--}
--
--sleep 3;
--
--{
--    my $stats = mem_stats($sock);
--    is($stats->{reclaimed}, 10, "expired key automatically reclaimed");
--}
--
--my $value = "B"x66560;
--
--print $sock "set canary 0 0 66560\r\n$value\r\n";
--is(scalar <$sock>, "STORED\r\n", "stored canary key");
--
--# Now flush the slab class with junk.
--for (my $key = 0; $key < 100; $key++) {
--    if ($key == 30) {
--        my $stats;
--        for (0..2) {
--            # Give the juggler some time to move. some platforms suffer at
--            # this more than others (solaris amd64?)
--            $stats = mem_stats($sock, "items");
--            if ($stats->{"items:31:moves_to_cold"} == 0) { sleep 1; next; }
--            last;
--        }
--        isnt($stats->{"items:31:moves_to_cold"}, 0, "moved some items to cold");
--        # Fetch the canary once, so it's now marked as active.
--        mem_get_is($sock, "canary", $value);
--    }
--    print $sock "set key$key 0 0 66560\r\n$value\r\n";
--    is(scalar <$sock>, "STORED\r\n", "stored key$key");
--}
--
--{
--    my $stats = mem_stats($sock);
--    isnt($stats->{evictions}, 0, "some evictions happened");
--    my $istats = mem_stats($sock, "items");
--    isnt($stats->{"items:31:number_warm"}, 0, "our canary moved to warm");
--}
--
--# Key should've been saved to the WARM_LRU, and still exists.
--mem_get_is($sock, "canary", $value);
--
--# Test NOEXP_LRU
--$server = new_memcached('-m 2 -o lru_maintainer,lru_crawler,expirezero_does_not_evict');
--$sock = $server->sock;
--
--{
--    my $stats = mem_stats($sock, "settings");
--    is($stats->{expirezero_does_not_evict}, "yes");
--}
--
--print $sock "set canary 0 0 66560\r\n$value\r\n";
--is(scalar <$sock>, "STORED\r\n", "stored noexpire canary key");
--
--{
--    my $stats = mem_stats($sock, "items");
--    is($stats->{"items:31:number_noexp"}, 1, "one item in noexpire LRU");
--    is($stats->{"items:31:number_hot"}, 0, "item did not go into hot LRU");
--}
--
--# *Not* fetching the key, and flushing the slab class with junk.
--# Using keys with actual TTL's here.
--for (my $key = 0; $key < 100; $key++) {
--    print $sock "set key$key 0 3600 66560\r\n$value\r\n";
--    is(scalar <$sock>, "STORED\r\n", "stored key$key");
--}
--
--{
--    my $stats = mem_stats($sock, "items");
--    isnt($stats->{evictions}, 0, "some evictions happened");
--    isnt($stats->{number_hot}, 0, "nonzero exptime items went into hot LRU");
--}
--# Canary should still exist, even unfetched, because it's protected by
--# noexpire.
--mem_get_is($sock, "canary", $value);
--- a/components/memcached/patches/03-fix-build.patch	Wed Mar 01 05:43:57 2017 -0800
+++ b/components/memcached/patches/03-fix-build.patch	Tue Mar 07 11:53:48 2017 -0800
@@ -1,13 +1,13 @@
-Adjustments needed to get memcached version 1.4.33 to build with the Studio
+Adjustments needed to get memcached version 1.4.35 to build with the Studio
 compiler on Solaris.
 
 These changes will be passed upstream.
 
---- memcached-1.4.33/logger.c.orig	2016-11-23 07:59:46.959952180 +0000
-+++ memcached-1.4.33/logger.c	2016-11-23 08:01:04.874324240 +0000
-@@ -7,6 +7,10 @@
- #include <poll.h>
- #include <ctype.h>
+--- memcached-1.4.35/logger.c.orig	2017-03-01 15:11:00.811829274 +0000
++++ memcached-1.4.35/logger.c	2017-03-01 15:11:09.009200863 +0000
+@@ -11,6 +11,10 @@
+ #include <atomic.h>
+ #endif
  
 +#if !defined(HAVE_GCC_64ATOMICS) && defined(__sun)
 +#include <atomic.h>
@@ -16,9 +16,9 @@
  #include "memcached.h"
  #include "bipbuffer.h"
  
---- memcached-1.4.33/memcached.c.orig	2016-11-23 08:01:32.066440520 +0000
-+++ memcached-1.4.33/memcached.c	2016-11-23 08:01:55.766437536 +0000
-@@ -358,8 +358,6 @@
+--- memcached-1.4.35/memcached.c.orig	2017-03-01 15:10:36.902614850 +0000
++++ memcached-1.4.35/memcached.c	2017-03-01 15:50:09.188544377 +0000
+@@ -364,8 +364,6 @@
                      sleep_time);
          usleep((useconds_t) sleep_time * 1000000);
      }
--- a/components/memcached/test/results-64.master	Wed Mar 01 05:43:57 2017 -0800
+++ b/components/memcached/test/results-64.master	Tue Mar 07 11:53:48 2017 -0800
@@ -3,7 +3,7 @@
 ok 3 - cache_constructor_fail
 ok 4 - cache_destructor
 ok 5 - cache_reuse
-ok # SKIP 6 - cache_redzone
+ok 6 - cache_redzone
 ok 7 - issue_161
 ok 8 - strtol
 ok 9 - strtoll
@@ -68,6 +68,7 @@
 t/getset.t .................. ok
 t/idle-timeout.t ............ ok
 t/incrdecr.t ................ ok
+t/inline_asciihdr.t ......... ok
 t/issue_104.t ............... ok
 t/issue_108.t ............... ok
 t/issue_14.t ................ ok
@@ -88,6 +89,7 @@
 t/item_size_max.t ........... ok
 t/line-lengths.t ............ ok
 t/lru-crawler.t ............. ok
+t/lru-maintainer.t .......... ok
 t/lru.t ..................... ok
 t/maxconns.t ................ ok
 t/multiversioning.t ......... ok