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
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
Show whitespace changes
Inline
Side-by-side
src/dict.c
View file @
f6d5996e
...
...
@@ -134,7 +134,7 @@ int _dictInit(dict *d, dictType *type,
* but with the invariant of a USED/BUCKETS ratio near to <= 1 */
int
dictResize
(
dict
*
d
)
{
int
minimal
;
unsigned
long
minimal
;
if
(
!
dict_can_resize
||
dictIsRehashing
(
d
))
return
DICT_ERR
;
minimal
=
d
->
ht
[
0
].
used
;
...
...
src/replication.c
View file @
f6d5996e
...
...
@@ -2754,11 +2754,16 @@ void replicationCacheMasterUsingMyself(void) {
server
.
master_repl_offset
,
delta
);
server
.
master_initial_offset
=
server
.
master_repl_meaningful_offset
;
server
.
master_repl_offset
=
server
.
master_repl_meaningful_offset
;
if
(
server
.
repl_backlog_histlen
<=
delta
)
{
server
.
repl_backlog_histlen
=
0
;
server
.
repl_backlog_idx
=
0
;
}
else
{
server
.
repl_backlog_histlen
-=
delta
;
server
.
repl_backlog_idx
=
(
server
.
repl_backlog_idx
+
(
server
.
repl_backlog_size
-
delta
))
%
server
.
repl_backlog_size
;
if
(
server
.
repl_backlog_histlen
<
0
)
server
.
repl_backlog_histlen
=
0
;
}
}
/* 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