Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
2.0-beta-2
-
Security Level: Public
-
None
-
Couchbase server 2.0 build 1971
Description
According to the specification touch 0 should set the expiry time to never expire, but for couchbase buckets it cause the document to expire immediately (memcached buckets does the right thing here).
Easy test is:
telnet localhost 11211
add a 1 30 1
a
touch a 0
get a
On a couchbase bucket you won't get anything back from the last get, whereas on memcached buckets you'll get the document a.
The bug is caused by the following code in ep_engine.cc (in EventuallyPersistentEngine::touch):
exptime = serverApi->core->abstime(serverApi->core->realtime(exptime));
Instead the code should be:
if (exptime != 0)
{ exptime = serverApi->core->abstime(serverApi->core->realtime(exptime)); }