memcp gets expiration time wrong
Bug #1261128 reported by
Thomas Bachem
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmemcached |
In Progress
|
Medium
|
Brian Aker |
Bug Description
The memcp (memccp on Debian systems) command line utility gets the supplied expire time wrong:
memcp --verbose --servers=localhost --set --expire=1418563176 "foo:bar"
op: set
source file: foo:bar
length: 4
key: foo:bar
flags: 0
expires: 86307647862
Calling memcached_free()
Providing a value of 54900000 leads to 1418723328, which brings me very near to my desired expiration time of 1418563176.
I tested this on Mac OS X 10.8.5 and Linux Debian 7.2.
Related branches
lp:~brianaker/libmemcached/1261128
- Tangent Trunk: Pending requested
- Diff: 0 lines
To post a comment you must log in.
I'm seeing this same issue on CentOS 5.6 and Ubuntu 12.04.
CentOS 5.6 with libmemcached version 1.0.4-3.el5
Ubuntu 12.04 with libmemcached version 0.42 and 0.44
As libmemcached evaluates the expire time differently depending upon if the seconds passed are < 30 days, it's worthwhile to note the same anomaly is seen with a much smaller value.
echo "Y" > testkey
memcp --verbose --debug --servers=localhost --expire=120 testkey
op: set
source file: testkey
length: 1
key: testkey
flags: 0
expires: 288