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
- Create two
ParquetProperties instances, each with a different ByteBufferAllocator
- Use them concurrently from different threads to write Parquet files
- Close the writer whose allocator "leaked" into the other's factory
- 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
Describe the bug, including details regarding any error messages, version, and platform.
DefaultValuesWriterFactorydelegates to static singleton instances ofDefaultV1ValuesWriterFactory/DefaultV2ValuesWriterFactory. Both singletons store a mutableparquetPropertiesfield that is overwritten on everyinitialize()call. When multipleParquetPropertiesinstances exist concurrently in the same JVM, the last caller toinitialize()wins, causing other writers to silently use a foreignParquetPropertiesand itsByteBufferAllocator.To Reproduce
ParquetPropertiesinstances, each with a differentByteBufferAllocatorExpected behavior
Each
ParquetPropertiesinstance should use its own allocator exclusively. TheValuesWriterFactoryshould not share mutable state across independent writer instances.Version
1.17.0 (also affects all prior versions with this code pattern)
Component(s)
Core