mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Streams: max node limits only checked if non zero.
This commit is contained in:
parent
19a438e2c0
commit
6d34ff3645
@ -241,9 +241,11 @@ int streamAppendItem(stream *s, robj **argv, int numfields, streamID *added_id,
|
|||||||
* if we need to switch to the next one. 'lp' will be set to NULL if
|
* if we need to switch to the next one. 'lp' will be set to NULL if
|
||||||
* the current node is full. */
|
* the current node is full. */
|
||||||
if (lp != NULL) {
|
if (lp != NULL) {
|
||||||
if (lp_bytes > server.stream_node_max_bytes) {
|
if (server.stream_node_max_bytes &&
|
||||||
|
lp_bytes > server.stream_node_max_bytes)
|
||||||
|
{
|
||||||
lp = NULL;
|
lp = NULL;
|
||||||
} else {
|
} else if (server.stream_node_max_entries) {
|
||||||
int64_t count = lpGetInteger(lpFirst(lp));
|
int64_t count = lpGetInteger(lpFirst(lp));
|
||||||
if (count > server.stream_node_max_entries) lp = NULL;
|
if (count > server.stream_node_max_entries) lp = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user