Skip to content

out_bigquery: add documentation for configurable buffer_size option #1915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tsubaron
Copy link

Add documentation for the buffer_size option in the BigQuery output plugin.

This complements fluent/fluent-bit#10596

@patrick-stephens
Copy link
Contributor

Can you resolve the DCO requirement as that is required to be able to merge?

@@ -60,6 +60,7 @@ You must configure workload identity federation in GCP before using it with Flue
| provider\_id | GCP workload identity provider. Used to construct the full resource name of the identity provider. Currently only AWS accounts are supported. | |
| google\_service\_account | Email address of the Google service account to impersonate. The workload identity provider must have permissions to impersonate this service account, and the service account must have permissions to access Google BigQuery resources (e.g. `write` access to tables) | |
| workers | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `0` |
| buffer_size | Sets the HTTP client buffer size (in bytes) for reading API responses from BigQuery. | `4192` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a fixed size, the lower or upper bound?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

The buffer_size is a fixed-size allocation for the HTTP client buffer. It is not a lower or upper bound. If a response exceeds this size, the plugin logs a warning.

We’ve updated the documentation to clarify this.

@tsubaron tsubaron force-pushed the out_bigquery-buffer-size-configurable branch 2 times, most recently from 0a097fe to c626388 Compare July 15, 2025 11:16
@@ -60,6 +60,7 @@ You must configure workload identity federation in GCP before using it with Flue
| provider\_id | GCP workload identity provider. Used to construct the full resource name of the identity provider. Currently only AWS accounts are supported. | |
| google\_service\_account | Email address of the Google service account to impersonate. The workload identity provider must have permissions to impersonate this service account, and the service account must have permissions to access Google BigQuery resources (e.g. `write` access to tables) | |
| workers | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `0` |
| buffer_size | Sets the HTTP client buffer size (in bytes) for reading API responses from BigQuery. This is a fixed-size allocation; responses larger than this size will trigger a warning. | `4192` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I presume the warning is that they won't be handled right or is this saying it will auto-grow?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially thought the buffer was fixed and allocated based on the provided size, but after checking the internal logic, it turns out the client dynamically increases the buffer as needed.

Here is the part where it grows the buffer, and just below it, you can see that if the allocation fails, a warning is logged and an error is returned:
https://github.com/tsubaron/fluent-bit/blob/out_bigquery-buffer-size-configurable/src/flb_http_client.c#L1470

I will update the documentation to reflect this behavior.

@tsubaron tsubaron force-pushed the out_bigquery-buffer-size-configurable branch from c626388 to 751b7b8 Compare July 15, 2025 11:52
@tsubaron tsubaron force-pushed the out_bigquery-buffer-size-configurable branch from 751b7b8 to e71cf43 Compare July 16, 2025 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants