Skip to content

Commit ac6c9d1

Browse files
authored
feat: Reduce the limit for messages in Stream from 50k to 10k. (#2185)
Since streams can be oversized by design, there is no check for this limit that would trigger a staged rollout. It's just that building streams will respect the new limit henceforth (except the usual oversizing due to reject responses). Meaning streams with more messages will just chew through them and not include new messages until they are below the new limit. Note that 50k was way higher than anything realistically attainable considering bottlenecks are elsewhere. Even 10k is still generous.
1 parent 35a25ea commit ac6c9d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rs/messaging/src/routing/stream_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const TARGET_STREAM_SIZE_BYTES: usize = 10 * 1024 * 1024;
6262
///
6363
/// At most `MAX_STREAM_MESSAGES` are enqueued into a stream; but only until its
6464
/// `count_bytes()` is greater than or equal to `TARGET_STREAM_SIZE_BYTES`.
65-
const MAX_STREAM_MESSAGES: usize = 50_000;
65+
const MAX_STREAM_MESSAGES: usize = 10_000;
6666

6767
const METRIC_STREAM_MESSAGES: &str = "mr_stream_messages";
6868
const METRIC_STREAM_BYTES: &str = "mr_stream_bytes";

0 commit comments

Comments
 (0)