feat(file sink): add parquet batch encoding to file sink - #25971
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa2e5e3ab9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a8a39ca6f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| match write_file(&mut file, &buffer).await { | ||
| Ok(()) => { | ||
| finalizers.update_status(EventStatus::Delivered); |
There was a problem hiding this comment.
Do not acknowledge filtered non-log events
When the upstream output advertises multiple event types (Vector's graph allows an all_bits output into a log-only sink), metric or trace events can still reach this Parquet path. ParquetSerializer::encode filters those non-log events out and returns Ok(()) (even with an empty buffer if the whole batch was non-log), but this success branch marks the finalizers for the original batch as Delivered, so end-to-end acknowledgements report dropped metric/trace events as successfully written and the sent counters include events that never made it into the Parquet file. Filter or reject non-log events before taking the batch finalizers, or mark the whole batch errored when any event is discarded by the encoder.
Useful? React with 👍 / 👎.
| let mut batches = input.batched_partitioned(partitioner, settings.timeout, move |_| { | ||
| settings.as_byte_size_config() | ||
| }); |
There was a problem hiding this comment.
Confine paths before partitioning batches
When path contains event-controlled fields, an outside-base_dir value still becomes a live partition key here and is retained by batched_partitioned until the batch fills or the 300s default timeout expires; sending many distinct invalid paths can therefore create an unbounded set of batches that will only be rejected later in write_batch. Confine the rendered path in the partitioner and return None/error for rejected paths so malicious keys are dropped before they allocate batch state.
Useful? React with 👍 / 👎.
Summary
add the 'parquet' batch encoder to the file sink
Vector configuration
How did you test this PR?
with a parquet schema that includes struct & array, being fed json objects
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
Notes
@vectordotdev/vectorto reach out to us regarding this PR.pre-pushhook, please see this template.make fmtmake check-clippy(if there are failures it's possible some of them can be fixed withmake clippy-fix)make testgit merge origin masterandgit push.Cargo.lock), pleaserun
make build-licensesto regenerate the license inventory and commit the changes (if any). More details on the dd-rust-license-tool.