Bug
Compressing a directory with --unstructured fails on empty files with the error:
Received input that was not unstructured logtext
When a directory containing empty log files (e.g., empty syslog rotation files) is compressed using
--unstructured, each empty file causes its compression task to fail. Non-empty files in the same
directory are compressed successfully, but the failed tasks are reported as errors.
Expected behavior: Empty files should be handled gracefully — either skipped silently or
compressed as empty archives — rather than treated as an error.
CLP version
main @ c48968d (0.9.1-dev)
Environment
- OS: Ubuntu 24.04 (Linux 6.8.0-94-generic)
- Docker: Docker Compose v2
- Storage engine: clp-s
Reproduction steps
- Start CLP with default config:
- Create a test directory with an empty file:
mkdir -p /tmp/test-empty
echo "2024-01-01 INFO some log line" > /tmp/test-empty/app.log
touch /tmp/test-empty/empty.log
- Compress the directory with
--unstructured:
./sbin/compress.sh --unstructured /tmp/test-empty
- The compression job reports task errors for each empty file:
Received input that was not unstructured logtext
Non-empty files are compressed successfully, but the overall job reports failures.
In the original test case, compressing ~/samples/hive-24hr (which contains empty syslog rotation
files) resulted in 7 of ~8 tasks reporting errors despite the non-empty data compressing successfully
(483 MB into 4.52 MB at 106.88x).
Bug
Compressing a directory with
--unstructuredfails on empty files with the error:When a directory containing empty log files (e.g., empty syslog rotation files) is compressed using
--unstructured, each empty file causes its compression task to fail. Non-empty files in the samedirectory are compressed successfully, but the failed tasks are reported as errors.
Expected behavior: Empty files should be handled gracefully — either skipped silently or
compressed as empty archives — rather than treated as an error.
CLP version
main @ c48968d (0.9.1-dev)
Environment
Reproduction steps
--unstructured:In the original test case, compressing
~/samples/hive-24hr(which contains empty syslog rotationfiles) resulted in 7 of ~8 tasks reporting errors despite the non-empty data compressing successfully
(483 MB into 4.52 MB at 106.88x).