Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
f6d5996e
Commit
f6d5996e
authored
Mar 30, 2020
by
antirez
Browse files
Merge branch 'unstable' of github.com:/antirez/redis into unstable
parents
3ef59b50
aca7f36b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dict.c
View file @
f6d5996e
...
@@ -134,7 +134,7 @@ int _dictInit(dict *d, dictType *type,
...
@@ -134,7 +134,7 @@ int _dictInit(dict *d, dictType *type,
* but with the invariant of a USED/BUCKETS ratio near to <= 1 */
* but with the invariant of a USED/BUCKETS ratio near to <= 1 */
int
dictResize
(
dict
*
d
)
int
dictResize
(
dict
*
d
)
{
{
int
minimal
;
unsigned
long
minimal
;
if
(
!
dict_can_resize
||
dictIsRehashing
(
d
))
return
DICT_ERR
;
if
(
!
dict_can_resize
||
dictIsRehashing
(
d
))
return
DICT_ERR
;
minimal
=
d
->
ht
[
0
].
used
;
minimal
=
d
->
ht
[
0
].
used
;
...
...
src/replication.c
View file @
f6d5996e
...
@@ -2754,11 +2754,16 @@ void replicationCacheMasterUsingMyself(void) {
...
@@ -2754,11 +2754,16 @@ void replicationCacheMasterUsingMyself(void) {
server.master_repl_offset,
server.master_repl_offset,
delta);
delta);
server.master_initial_offset = server.master_repl_meaningful_offset;
server.master_initial_offset = server.master_repl_meaningful_offset;
server.repl_backlog_histlen -= delta;
server.master_repl_offset = server.master_repl_meaningful_offset;
server.repl_backlog_idx =
if (server.repl_backlog_histlen <= delta) {
(server.repl_backlog_idx + (server.repl_backlog_size - delta)) %
server.repl_backlog_histlen = 0;
server.repl_backlog_size;
server.repl_backlog_idx = 0;
if (server.repl_backlog_histlen < 0) server.repl_backlog_histlen = 0;
} else {
server.repl_backlog_histlen -= delta;
server.repl_backlog_idx =
(server.repl_backlog_idx + (server.repl_backlog_size - delta)) %
server.repl_backlog_size;
}
}
}
/* The master client we create can be set to any DBID, because
/* The master client we create can be set to any DBID, because
...
...
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