You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "juja0 (via GitHub)" <gi...@apache.org> on 2025/05/24 15:10:38 UTC
[I] ParquetProperties.valuesWriterFactory is not thread-safe [parquet-java]
juja0 opened a new issue, #3224:
URL: https://github.com/apache/parquet-java/issues/3224
### Describe the bug, including details regarding any error messages, version, and platform.
ParquetProperties.valuesWriterFactory defaults to a singleton instance of DefaultValuesWriterFactory.
ParquetOutputFormat.getRecordWriter provides no way of setting/overriding "valuesWriterFactory" in ParquetProperties.Builder so the same singleton instance of DefaultValuesWriterFactory is used every time.
DefaultValuesWriterFactory.initialize dynamically sets the instance field "delegateFactory" to either a v1 or v2 factory.
When writing to multiple parquet files concurrently, with some threads using v1 and others using v2, the actual writer used becomes unpredictable and files get written with an incorrect format.
Potential fix: ParquetProperties.Builder.valuesWriterFactory should not be instantiated to a singleton instance of DefaultValuesWriterFactory. Instead, it should be instantiated to a new instance of DefaultValuesWriterFactory in the constructor of ParquetProperties.Builder
### Component(s)
_No response_
--
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: issues-unsubscribe@parquet.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [I] ParquetProperties.valuesWriterFactory is not thread-safe [parquet-java]
Posted by "gszadovszky (via GitHub)" <gi...@apache.org>.
gszadovszky closed issue #3224: ParquetProperties.valuesWriterFactory is not thread-safe
URL: https://github.com/apache/parquet-java/issues/3224
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org