summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2019-10-10 14:49:35 +0200
committerGitHub <noreply@github.com>2019-10-10 14:49:35 +0200
commit1677f4223c6111c5287b58aa171ffc5d5072a47f (patch)
tree35a88ae7818b69f5045ade44d70868a716ff14ef
parent14a9da061311e8c277b773022af8e2a094eec13a (diff)
parent2fae0192e86c4222d8c735fda8a1f35164e1ca92 (diff)
downloadredis-1677f4223c6111c5287b58aa171ffc5d5072a47f.tar.gz
Merge pull request #6443 from guybe7/fix_stream_rax_node_limits
Fix usage of server.stream_node_max_*
-rw-r--r--src/t_stream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/t_stream.c b/src/t_stream.c
index 9e7d3d126..ea9a620f1 100644
--- a/src/t_stream.c
+++ b/src/t_stream.c
@@ -242,17 +242,17 @@ int streamAppendItem(stream *s, robj **argv, int64_t numfields, streamID *added_
* the current node is full. */
if (lp != NULL) {
if (server.stream_node_max_bytes &&
- lp_bytes > server.stream_node_max_bytes)
+ lp_bytes >= server.stream_node_max_bytes)
{
lp = NULL;
} else if (server.stream_node_max_entries) {
int64_t count = lpGetInteger(lpFirst(lp));
- if (count > server.stream_node_max_entries) lp = NULL;
+ if (count >= server.stream_node_max_entries) lp = NULL;
}
}
int flags = STREAM_ITEM_FLAG_NONE;
- if (lp == NULL || lp_bytes > server.stream_node_max_bytes) {
+ if (lp == NULL || lp_bytes >= server.stream_node_max_bytes) {
master_id = id;
streamEncodeID(rax_key,&id);
/* Create the listpack having the master entry ID and fields. */