The current shared_ptr implementation is efficient, but does not support
polymorphic types.
Rename it in order to make room for a polymorphic shared_ptr.
Terminate a running memcached instance with a SIGTERM instead of a
SIGKILL to allow the process to close in a cleaner manner
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
Improves memaslap UDP posix throughput on my laptop by 40% (from 73k to 105k).
When item is created we cache flags and size part of the response so
that there's no need to call expensive string formatting in get(). The
down side is that this pollutes "item" object with protocol-specific
field, but since ASCII is the only protocol which is supported now and
it's not like we can't fix it later, I think it's fine.
There is a separate DB per core, each serving a subset of the key
space. From the outside in appears to behave as one DB.
item_key type was changed to include the hash so that we calculate the
hash only once. The same hash is used for sharding and hashing. No
need for store_hash<> option on unordered_set<> any more.
Some seastar-specific and hashtable-specific stats were moved from the
general "stats" command into "stats hash", which shows per-core
statistics.
Some versions of python do not tolerate this regex:
r'(\w*)?'
ERROR: test_incr (__main__.TestCommands)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/memcached/test_memcached.py", line 464, in test_incr
self.assertRegexpMatches(call('incr key 1\r\n').decode(), r'0(\w*)?\r\n')
File "/usr/lib64/python3.3/unittest/case.py", line 1178, in deprecated_func
return original_func(*args, **kwargs)
File "/usr/lib64/python3.3/unittest/case.py", line 1153, in assertRegex
expected_regex = re.compile(expected_regex)
File "/usr/lib64/python3.3/re.py", line 214, in compile
return _compile(pattern, flags)
File "/usr/lib64/python3.3/re.py", line 281, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib64/python3.3/sre_compile.py", line 498, in compile
code = _code(p, flags)
File "/usr/lib64/python3.3/sre_compile.py", line 483, in _code
_compile(code, p.data, flags)
File "/usr/lib64/python3.3/sre_compile.py", line 75, in _compile
elif _simple(av) and op is not REPEAT:
File "/usr/lib64/python3.3/sre_compile.py", line 362, in _simple
raise error("nothing to repeat")
sre_constants.error: nothing to repeat
The protocol is called the "memcache protocol" but the server should
follow the same naming convention as httpd does.
It should not be a big deal but it annoys the hell out of simple people
like myself who have their brain hard-wired to type the final "d"...
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>