kroki wrote:
On Oct 29, 4:00 pm, kroki <tomash.brec...@gmail.com> wrote:
Handle... how? What are your suggestions on how to support this in
clients?
Note that even Brian's libmemcached fails to support this protocol
change. From libmemcached-0.34:
if (expiration)
send_length= (size_t) snprintf(buffer,
MEMCACHED_DEFAULT_COMMAND_SIZE,
"delete %s%.*s %u%s\r\n",
ptr->prefix_key,
(int) key_length, key,
(uint32_t)expiration, no_reply ?
" noreply" :"" );
else
send_length= (size_t) snprintf(buffer,
MEMCACHED_DEFAULT_COMMAND_SIZE,
"delete %s%.*s%s\r\n",
ptr->prefix_key,
(int)key_length, key, no_reply ?
" noreply" :"");
(expiration is a time_t). The code says that if expiration is non-
zero (old behavior) the command will be "delete key EXP [noreply]".
And it expiration is zero the command will be "delete key [noreply]".
Clearly, there's no way to send zero expiration time to memcached <
1.4.0, which is simply broken because normally zero is passed by the
user. So delete doesn't work for libmemcached+memcached < 1.4.0.
I proposed to deprecate the API to Brian a couple of days ago, but he
was afraid that changing the API would break a lot of other bindings
that is built on top of libmemcached (in addition to all of the
applications).
Please reconcider ;).
I would rather fix that in libmemcached instead, and created
https://bugs.launchpad.net/libmemcached/+bug/463297
Cheers,
Trond