Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0-beta-2
-
Fix Version/s: 2.0
-
Component/s: couchbase-bucket
-
Security Level: Public
-
Labels:None
-
Environment: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));
}
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));
}
Activity
- All
- Comments
- Work Log
- History
- Activity
- Gerrit Reviews
Farshid Ghods
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 2.0 [ 10114 ] | |
| Priority | Major [ 3 ] | Blocker [ 1 ] |
Mike Wiederhold
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |