arouel opened a new issue, #3497:
URL: https://github.com/apache/parquet-java/issues/3497

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   `DefaultValuesWriterFactory` delegates to static singleton instances of 
`DefaultV1ValuesWriterFactory` / `DefaultV2ValuesWriterFactory`. Both 
singletons store a mutable `parquetProperties` field that is overwritten on 
every `initialize()` call. When multiple `ParquetProperties` instances exist 
concurrently in the same JVM, the last caller to `initialize()` wins, causing 
other writers to silently use a foreign `ParquetProperties` and its 
`ByteBufferAllocator`.
   
   ### To Reproduce
   1. Create two `ParquetProperties` instances, each with a different 
`ByteBufferAllocator`
   2. Use them concurrently from different threads to write Parquet files
   3. Close the writer whose allocator "leaked" into the other's factory
   4. The other writer crashes on the next buffer write
   
   ### Expected behavior
   Each `ParquetProperties` instance should use its own allocator exclusively. 
The `ValuesWriterFactory` should not share mutable state across independent 
writer instances.
   
   ### Version
   1.17.0 (also affects all prior versions with this code pattern)
   
   ### Component(s)
   
   Core


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to