You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "edubraqd (via GitHub)" <gi...@apache.org> on 2026/09/04 21:12:41 UTC
[PR] fix: reject a zero `objectstore_writer_buffer_size` instead of hanging [datafusion]
edubraqd opened a new pull request, #24949:
URL: https://github.com/apache/datafusion/pull/24949
## Which issue does this PR close?
- N/A (found while fuzzing configuration values; happy to open one if preferred).
## Rationale for this change
`datafusion.execution.objectstore_writer_buffer_size` accepted `0`, and every object store write then hung: `BufWriter::with_capacity(_, _, 0)` switches to a multipart upload with a chunk size of 0, and `object_store`'s `WriteMultipart::put` splits off zero bytes in a loop without ever consuming its input.
```sql
SET datafusion.execution.objectstore_writer_buffer_size = 0;
COPY (SELECT 1) TO 'x.parquet'; -- never returns
```
## What changes are included in this PR?
The option becomes a `ConfigNonZeroUsize`, like `datafusion.execution.batch_size` and `datafusion.sql_parser.recursion_limit`, so `SET ... = 0` fails with `value must be greater than 0`. The seven call sites read it with `.get()`, and the option's description (docs and `information_schema`) notes the constraint. (The zero-chunk loop in `object_store` is worth a separate report there; this change keeps DataFusion from reaching it.)
## Are these changes tested?
Yes. `test_objectstore_writer_buffer_size_must_be_positive` checks that a positive value is accepted and `0` is rejected at `SET` time. `copy.slt` and `information_schema.slt` pass (the default is still `10485760`).
## Are there any user-facing changes?
Setting `objectstore_writer_buffer_size` to `0` is now a configuration error. The field's Rust type changes from `usize` to `ConfigNonZeroUsize`, the same change `batch_size` went through.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: reject a zero `objectstore_writer_buffer_size` instead of hanging [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed pull request #24949: fix: reject a zero `objectstore_writer_buffer_size` instead of hanging
URL: https://github.com/apache/datafusion/pull/24949
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: reject a zero `objectstore_writer_buffer_size` instead of hanging [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #24949:
URL: https://github.com/apache/datafusion/pull/24949#issuecomment-5640803190
Closing per https://github.com/apache/datafusion/pull/24893#issuecomment-5640786567
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org