diff options
author | Oran Agra <oran@redislabs.com> | 2019-07-16 11:00:34 +0300 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-07-17 16:46:22 +0200 |
commit | c56b4ddc6f216ff751f9e8e94d345eee30d9997c (patch) | |
tree | b6e00dace3430e7caa3b8fcb31b831bfa5aca4b9 /src/rdb.h | |
parent | 241d18d954289fcccd98a1183cd0d161dbf7acb1 (diff) | |
download | redis-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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |