Skip to content

Commit

Permalink
fix(vector source): Remove the 4MB default for requests (vectordotdev…
Browse files Browse the repository at this point in the history
…#18186)

This was added in tonic 0.9 but caused a regression in Vector behavior. I think ideally this would
be configurable, but I think in this case we can let users ask for it since the use-case for the
`vector` source/sink is primarily such that the operator controls both sides and doesn't need to
worry about DOS from misbehaving clients.

Fixes: vectordotdev#17926

Signed-off-by: Jesse Szwedko <[email protected]>
  • Loading branch information
jszwedko authored Aug 8, 2023
1 parent 0c1cf23 commit 4cc9cdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sources/vector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ impl SourceConfig for VectorConfig {
acknowledgements,
log_namespace,
})
.accept_compressed(tonic::codec::CompressionEncoding::Gzip);
.accept_compressed(tonic::codec::CompressionEncoding::Gzip)
// Tonic added a default of 4MB in 0.9. This replaces the old behavior.
.max_decoding_message_size(usize::MAX);

let source =
run_grpc_server(self.address, tls_settings, service, cx.shutdown).map_err(|error| {
Expand Down

0 comments on commit 4cc9cdf

Please sign in to comment.