Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ae8cab32
Commit
ae8cab32
authored
Sep 06, 2019
by
antirez
Browse files
Merge branch 'unstable' of github.com:/antirez/redis into unstable
parents
a092f20d
86aade9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/rdb.c
View file @
ae8cab32
...
...
@@ -1114,7 +1114,12 @@ ssize_t rdbSaveSingleModuleAux(rio *rdb, int when, moduleType *mt) {
if
(
retval
==
-
1
)
return
-
1
;
io
.
bytes
+=
retval
;
/* write the 'when' so that we can provide it on loading */
/* write the 'when' so that we can provide it on loading. add a UINT opcode
* for backwards compatibility, everything after the MT needs to be prefixed
* by an opcode. */
retval
=
rdbSaveLen
(
rdb
,
RDB_MODULE_OPCODE_UINT
);
if
(
retval
==
-
1
)
return
-
1
;
io
.
bytes
+=
retval
;
retval
=
rdbSaveLen
(
rdb
,
when
);
if
(
retval
==
-
1
)
return
-
1
;
io
.
bytes
+=
retval
;
...
...
@@ -2132,8 +2137,11 @@ int rdbLoadRio(rio *rdb, rdbSaveInfo *rsi, int loading_aof) {
* Such data can be potentially be stored both before and after the
* RDB keys-values section. */
uint64_t
moduleid
=
rdbLoadLen
(
rdb
,
NULL
);
int
when_opcode
=
rdbLoadLen
(
rdb
,
NULL
);
int
when
=
rdbLoadLen
(
rdb
,
NULL
);
if
(
rioGetReadError
(
rdb
))
goto
eoferr
;
if
(
when_opcode
!=
RDB_MODULE_OPCODE_UINT
)
rdbReportReadError
(
"bad when_opcode"
);
moduleType
*
mt
=
moduleTypeLookupModuleByID
(
moduleid
);
char
name
[
10
];
moduleTypeNameByID
(
name
,
moduleid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment