summaryrefslogtreecommitdiff
path: root/src/rdb.h
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2019-07-16 11:00:34 +0300
committerantirez <antirez@gmail.com>2019-07-17 16:46:22 +0200
commitc56b4ddc6f216ff751f9e8e94d345eee30d9997c (patch)
treeb6e00dace3430e7caa3b8fcb31b831bfa5aca4b9 /src/rdb.h
parent241d18d954289fcccd98a1183cd0d161dbf7acb1 (diff)
downloadredis-c56b4ddc6f216ff751f9e8e94d345eee30d9997c.tar.gz
prevent diskless replica from terminating on short read
now that replica can read rdb directly from the socket, it should avoid exiting on short read and instead try to re-sync. this commit tries to have minimal effects on non-diskless rdb reading. and includes a test that tries to trigger this scenario on various read cases.
Diffstat (limited to 'src/rdb.h')
-rw-r--r--src/rdb.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rdb.h b/src/rdb.h
index 0acddf9ab..2bec0171b 100644
--- a/src/rdb.h
+++ b/src/rdb.h
@@ -127,10 +127,10 @@
int rdbSaveType(rio *rdb, unsigned char type);
int rdbLoadType(rio *rdb);
int rdbSaveTime(rio *rdb, time_t t);
-time_t rdbLoadTime(rio *rdb);
+int rdbLoadTime(rio *rdb, time_t *t);
int rdbSaveLen(rio *rdb, uint64_t len);
int rdbSaveMillisecondTime(rio *rdb, long long t);
-long long rdbLoadMillisecondTime(rio *rdb, int rdbver);
+int rdbLoadMillisecondTime(rio *rdb, long long *t, int rdbver);
uint64_t rdbLoadLen(rio *rdb, int *isencoded);
int rdbLoadLenByRef(rio *rdb, int *isencoded, uint64_t *lenptr);
int rdbSaveObjectType(rio *rdb, robj *o);