iipc / jwarc

Java library for reading and writing WARC files with a typed API
Apache License 2.0
48 stars 8 forks source link

Multithreading issue on GzipChannel write header #79

Closed creyer closed 1 year ago

creyer commented 1 year ago

When having multiple instances of WarcWriter the operations on private static final ByteBuffer GZIP_HEADER = ByteBuffer.wrap(GZIP_HEADER_); are causing issues. Some threads are writing the gzip header, some might not.

I think the issue could be fixed by removing the static part for the GZIP_HEADER.

ato commented 1 year ago

Yikes. Good catch.

Suggested fix applied in 68575d42cf0c589b78923055864ab73640b5e78e and released as 0.28.3.