out_bigquery: make HTTP buffer size configurable #10596
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace hardcoded HTTP buffer size in the BigQuery output plugin with a configurable value from
ctx->buffer_size
.Previously, the buffer size was fixed at 4192 bytes:
This has now been updated to:
so that users can adjust the buffer size via configuration if needed.
We understand that the buffer size was previously hardcoded because BigQuery API responses are generally assumed to be of fixed size.
However, in practice we have observed cases where the plugin encounters buffer overflow errors. We suspect this happens when the BigQuery API returns larger-than-expected error responses in certain situations.
Making the buffer size configurable allows users to increase it as needed to inspect the full API response, which is especially useful for debugging and monitoring unexpected behaviors in production environments.
This is a small, backward-compatible change that does not alter existing behavior unless the buffer_size option is explicitly configured. The default value remains 4192 bytes. For these reasons, we believe this enhancement is suitable for inclusion in the next patch release (4.0.x).
Fixes #9061
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
[N/A] This change only adjusts the buffer size configuration; no memory allocations or changes in lifecycle management were introduced.
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
[N/A]
ok-package-test
label to test for all targets (requires maintainer to do).[N/A]
Documentation
See: fluent/fluent-bit-docs#1915
Backporting
This enhancement is backward-compatible and small in scope. We believe it is suitable for inclusion in the next patch release (4.0.x).
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.