Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a delta timeout for memcache where possible
We use a delta timeout value for timeouts under 30 days (in seconds) since that is the limit which the memcached protocols will recognize a timeout as a delta. Greater than 30 days and it interprets it as an absolute time in seconds since the epoch. This helps to address an often difficult-to-debug problem of time drift between memcache clients and the memcache servers. Prior to this change, if a client's time drifts behind the servers, short timeouts run the danger of not being cached at all. If a client's time drifts ahead of the servers, short timeouts run the danger of persisting too long. Using delta's avoids this affect. For absolute timeouts 30 days or more in the future small time drifts between clients and servers are inconsequential. See also bug 1076148 (https://bugs.launchpad.net/swift/+bug/1076148). This also fixes incr and decr to handle timeout values in the same way timeouts are handled for set operations. Change-Id: Ie36dbcedfe9b4db9f77ed4ea9b70ff86c5773310 Signed-off-by: Peter Portante <peter.portante@redhat.com>
- Loading branch information
Showing
2 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters