Fixed issues with expire introduced with latest millisecond resolution feature. Many time_t were not converted to long long, and one time() call was not replaced with mstime().

This commit is contained in:
antirez
2011-11-12 01:04:27 +01:00
parent 3570629f90
commit 4be855e757
4 changed files with 7 additions and 7 deletions

View File

@ -431,7 +431,7 @@ int rewriteAppendOnlyFile(char *filename) {
FILE *fp;
char tmpfile[256];
int j;
time_t now = time(NULL);
long long now = mstime();
/* Note that we have to use a different temp name here compared to the
* one used by rewriteAppendOnlyFileBackground() function. */
@ -462,7 +462,7 @@ int rewriteAppendOnlyFile(char *filename) {
while((de = dictNext(di)) != NULL) {
sds keystr;
robj key, *o;
time_t expiretime;
long long expiretime;
keystr = dictGetKey(de);
o = dictGetVal(de);