Skip to content

Commit

Permalink
fix(vector source): Remove the 4MB default for requests
Browse files Browse the repository at this point in the history
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: #17926

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
jszwedko committed Aug 8, 2023
1 parent e476e12 commit a63d93a
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 a63d93a

Please sign in to comment.