Exptime and append


Found behaviour that is somewhat strange.

do a set, with exptime 20
wait 1 sec
do a touch with exptime 2, overriding the previous exptime
wait 3 secs
the document is no longer there, and that looks like wanted behaviour.

do a set, with exptime 20
wait 1 sec
do a append with exptime 2, (which should be overriding the previous exptime?)
wait 3 secs
the document is still there.

Is this a bug or a feature?
What should be the expected behaviour?

  1. like touch, overriding the old exptime
  2. the append expires and the original version comes back. (did not test if that was the case). But that would be very weird, as multiple appends can have different exptimes, potentially expiring out of order.
  3. on append, exptime is ignored.

Client 2.0.7, on libevent
Server 2.0.1 community edition (build-170)



As you know Couchbase API (and protocol) is based on the memcached protocol, and it behaves the same.

Event is the Append/Prepend operation allows you to set an expiration time, this parameter is not used by the server. So it is the “expected” behavior.

One way to validate the behavior of the commands/operations you want to use in your application is to reproduce them using a telnet command.

Note: I have created a doc bug to be sure we document this, see http://www.couchbase.com/issues/browse/MB-8715 .