jrecuerda opened a new issue, #31863: URL: https://github.com/apache/beam/issues/31863
### What happened? When using WriteToFiles with a custom sink that implements the create_metadata function to set compression type as BZ2 it fails if `self._fh.flush()` is called in the flush method because `flush()` is called twice for the compressor. It happens because both the flush and close methods of `io.filesystem.CompressedFile` call `compressor.flush()`. If `self._fh.flush()` is not called in the flush implementation the resulting file miss a info. ### Issue Priority Priority: 3 (minor) ### Issue Components - [X] Component: Python SDK - [ ] Component: Java SDK - [ ] Component: Go SDK - [ ] Component: Typescript SDK - [ ] Component: IO connector - [ ] Component: Beam YAML - [ ] Component: Beam examples - [ ] Component: Beam playground - [ ] Component: Beam katas - [ ] Component: Website - [ ] Component: Spark Runner - [ ] Component: Flink Runner - [ ] Component: Samza Runner - [ ] Component: Twister2 Runner - [ ] Component: Hazelcast Jet Runner - [ ] Component: Google Cloud Dataflow Runner -- 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]
