Skip to content

feat(clp-s::log_converter): Add support for compressing converted KV-IR files; make compressing outputs the default behaviour.#2240

Open
gibber9809 wants to merge 13 commits into
y-scope:mainfrom
gibber9809:log-converter-zstd
Open

feat(clp-s::log_converter): Add support for compressing converted KV-IR files; make compressing outputs the default behaviour.#2240
gibber9809 wants to merge 13 commits into
y-scope:mainfrom
gibber9809:log-converter-zstd

Conversation

@gibber9809
Copy link
Copy Markdown
Contributor

@gibber9809 gibber9809 commented May 1, 2026

Description

This PR adds support for compressing converted KV-IR files using zstd. This is now the default behaviour for log-converter, and can be disabled using the --no-compress-converted-files flag.

Implementation-wise this involves changing LogSeriailzer to accept a series of nested writers instead of a single FileWriter. To simplify the implementation we switch to using the clp version of a FileWriter and zstd::Compressor, since they implement WriterInterface, which makes them easier to work with in a more generic way. Aside: close should probably be made part of clp::WriterInterface, and without that I'm forced to test whether a given clp::WriterInterface implements close via dynamic_cast to the many derived classes that individually implement close. (Added 2291 to track this issue with close).

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • Validated that integration tests pass
  • Measured that converting and compressing the hive-24hr dataset is only ~0.5% slower (on an HDD)

Summary by CodeRabbit

  • New Features

    • Added a command-line option to disable compression of converted log files (compression enabled by default).
    • Conversion output can be written with optional Zstandard streaming compression.
  • Refactor

    • Public conversion APIs updated to accept an explicit compression flag so callers can control output compression.
  • Chores

    • Build configuration expanded to include streaming compression and related I/O components.

Review Change Stack

…mpressed KV-IR outputs the default in log-converter.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

Caution

Review failed

Failed to post review comments

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds optional Zstandard compression for converted KV-IR files: build wiring for FileWriter and streaming compression sources, threads a compression flag through LogConverter and CLI, and refactors LogSerializer to use a nested writer chain (FileWriter ± Zstd Compressor).

Changes

Log Conversion with Optional Compression

Layer / File(s) Summary
Build wiring for FileWriter & compressors
components/core/src/clp_s/CMakeLists.txt
Added ../clp/FileWriter.{cpp,hpp} and streaming_compression headers + zstd compressor sources to build sources.
LogSerializer header: nested-writer API
components/core/src/clp_s/log_converter/LogSerializer.hpp
Reorganized includes; create(..., bool compress_with_zstd) factory; replaced single FileWriter with std::vector<std::unique_ptr<clp::WriterInterface>> nested-writers; updated constructor, flush_buffer(), and close() to operate on the writer stack.
LogSerializer implementation: build writer chain
components/core/src/clp_s/log_converter/LogSerializer.cpp
Added std includes and compression/writer headers; create() now builds a FileWriter, optionally wraps it with zstd Compressor, selects file extension by compression flag, and returns composed nested writers with error handling for file open and compressor setup.
CLI flag and parsing
components/core/src/clp_s/log_converter/CommandLineArguments.{hpp,cpp}
Added backing member m_compress_converted_files (default true), public getter get_compress_converted_files(), and --no-compress-converted-files bool switch that overrides the member when provided.
LogConverter API & call-site wiring
components/core/src/clp_s/log_converter/LogConverter.{hpp,cpp}, components/core/src/clp_s/log_converter/log_converter.cpp
Extended convert_file(..., bool compress_converted_file) signature and passed the CLI-controlled compress flag into LogSerializer::create at call sites.

Sequence Diagram

sequenceDiagram
    participant CLI as CommandLineArguments
    participant Converter as LogConverter
    participant Serializer as LogSerializer
    participant FileWriter as FileWriter
    participant Zstd as ZstdCompressor

    CLI->>Converter: convert_file(path, reader, out_dir, compress_flag)
    Converter->>Serializer: create(out_dir, path, compress_flag)
    alt compress_flag == true
        Serializer->>FileWriter: create/open file (uncompressed layer)
        Serializer->>Zstd: create/open compressor wrapping FileWriter
    else compress_flag == false
        Serializer->>FileWriter: create/open file
    end
    Serializer-->>Converter: LogSerializer(with nested writers)
    Converter->>Serializer: add_message(record)
    Serializer->>FileWriter: write (optionally via Zstd)
    Converter->>Serializer: close()
    Serializer->>Zstd: close (if present)
    Serializer->>FileWriter: close
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • y-scope/clp#2284: Touches LogConverter construction and convert_file call paths; related to conversion flow changes.

Suggested reviewers

  • LinZhihao-723
  • davidlion
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main feature addition—compression support for converted KV-IR files with compression as default behaviour, which is reflected across all changed files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gibber9809 gibber9809 changed the title feat(log-converter) Add support for compressing converted KV-IR files; make compressing outputs the default behaviour. feat(clp-s::log_converter): Add support for compressing converted KV-IR files; make compressing outputs the default behaviour. May 1, 2026
@gibber9809 gibber9809 marked this pull request as ready for review May 6, 2026 20:00
@gibber9809 gibber9809 requested a review from a team as a code owner May 6, 2026 20:00
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/core/src/clp_s/CMakeLists.txt`:
- Around line 70-71: The CMake source list erroneously repeats
"../clp/FileReader.hpp" instead of including the header for the newly added
implementation; update the list in CMakeLists.txt so that the entry
corresponding to the added "../clp/FileWriter.cpp" is "../clp/FileWriter.hpp"
(remove the duplicate FileReader.hpp and add FileWriter.hpp) to ensure
FileWriter's header is present in the IDE/source set.

In `@components/core/src/clp_s/log_converter/LogSerializer.cpp`:
- Around line 53-64: The create() path currently only catches exceptions from
clp::FileWriter::open() and maps all failures to
std::errc::no_such_file_or_directory, and it leaves
clp::streaming_compression::zstd::Compressor::open() unguarded; update
LogSerializer::create to wrap both the FileWriter setup and the compressor setup
in their own try/catch blocks so no exceptions propagate (honor the
Result<LogSerializer> contract), and when catching exceptions from
clp::FileWriter use exception details to map to more accurate std::errc values
(or attach the original error) instead of always returning
no_such_file_or_directory; specifically add a try/catch around
compressor->open() (and nested_writers.emplace_back for the compressor) to
convert OperationFailed and other throws into the function's Result error
return, and change the FileWriter catch to inspect the exception type/message
before returning the appropriate std::errc.

In `@components/core/src/clp_s/log_converter/LogSerializer.hpp`:
- Around line 80-93: The close() method performs finalization (flush_buffer(),
m_nested_writers.back()->write_numeric_value(clp::ffi::ir_stream::cProtocol::Eof)
and closing compressors/FileWriter instances) but is opt-in and can be skipped;
change to an abort/commit lifecycle: write outputs to a temporary file during
the LogSerializer lifetime, ensure close() performs the commit/rename on success
and marks the object committed, and ensure the destructor (or an RAII guard
owned by LogSerializer) deletes the temporary file if not committed so
incomplete outputs are removed. Make this change around the existing symbols:
close(), flush_buffer(), m_nested_writers, write_numeric_value(...Eof),
dynamic_cast<clp::streaming_compression::Compressor*> and
dynamic_cast<clp::FileWriter*> so that successful close() renames temp->final
and the destructor/abort path cleans up the temp file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2c27d2a3-26c8-44cd-b631-141dc5c77976

📥 Commits

Reviewing files that changed from the base of the PR and between 8cca23e and 7230434.

📒 Files selected for processing (8)
  • components/core/src/clp_s/CMakeLists.txt
  • components/core/src/clp_s/log_converter/CommandLineArguments.cpp
  • components/core/src/clp_s/log_converter/CommandLineArguments.hpp
  • components/core/src/clp_s/log_converter/LogConverter.cpp
  • components/core/src/clp_s/log_converter/LogConverter.hpp
  • components/core/src/clp_s/log_converter/LogSerializer.cpp
  • components/core/src/clp_s/log_converter/LogSerializer.hpp
  • components/core/src/clp_s/log_converter/log_converter.cpp

Comment thread components/core/src/clp_s/CMakeLists.txt Outdated
Comment thread components/core/src/clp_s/log_converter/LogSerializer.cpp
Comment on lines 80 to +93
void close() {
flush_buffer();
m_writer.write_numeric_value(clp::ffi::ir_stream::cProtocol::Eof);
m_writer.close();
m_nested_writers.back()->write_numeric_value(clp::ffi::ir_stream::cProtocol::Eof);
for (auto it{m_nested_writers.rbegin()}; it != m_nested_writers.rend(); ++it) {
if (auto compressor{dynamic_cast<clp::streaming_compression::Compressor*>(it->get())};
nullptr != compressor)
{
compressor->close();
} else if (auto file_writer{dynamic_cast<clp::FileWriter*>(it->get())};
nullptr != file_writer)
{
file_writer->close();
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

close() is carrying correctness-critical work that callers can skip.

This method now writes the EOF marker and finalises the writer chain, but it is still entirely opt-in. Any later TRY* or parse-error return after construction can bypass it, leaving an incomplete compressed output behind in the destination directory. Please move to an abort/commit lifecycle here (for example, temp file + rename on success, delete on failure) or make destruction clean up incomplete outputs automatically.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/core/src/clp_s/log_converter/LogSerializer.hpp` around lines 80 -
93, The close() method performs finalization (flush_buffer(),
m_nested_writers.back()->write_numeric_value(clp::ffi::ir_stream::cProtocol::Eof)
and closing compressors/FileWriter instances) but is opt-in and can be skipped;
change to an abort/commit lifecycle: write outputs to a temporary file during
the LogSerializer lifetime, ensure close() performs the commit/rename on success
and marks the object committed, and ensure the destructor (or an RAII guard
owned by LogSerializer) deletes the temporary file if not committed so
incomplete outputs are removed. Make this change around the existing symbols:
close(), flush_buffer(), m_nested_writers, write_numeric_value(...Eof),
dynamic_cast<clp::streaming_compression::Compressor*> and
dynamic_cast<clp::FileWriter*> so that successful close() renames temp->final
and the destructor/abort path cleans up the temp file.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
components/core/src/clp_s/log_converter/LogSerializer.cpp (1)

53-71: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Both catch blocks still discard the original error category.

The compressor stage is now wrapped (good), but both handlers swallow std::exception and collapse every failure to a single std::errc value — no_such_file_or_directory for any FileWriter::open failure (including permission, EROFS, EIO, name-too-long, etc.) and protocol_error for any Compressor failure (including allocation failure, parameter errors, OOM). This silently misleads callers and complicates user-facing diagnostics. Consider catching clp::FileWriter::OperationFailed / clp::TraceableException (or inspecting errno/what()) and propagating a more accurate std::errc, or returning a richer error type.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/core/src/clp_s/log_converter/LogSerializer.cpp` around lines 53 -
71, The current catch-all handlers around FileWriter::open and
zstd::Compressor::open swallow exception details and map every failure to a
single std::errc; change them to preserve and map the original error: catch the
concrete exception types thrown by clp (e.g., clp::FileWriter::OperationFailed
or clp::TraceableException) and extract error info (errno, error code, or
what()) to translate to a more specific std::errc (or return a richer error
type) before returning; update the FileWriter::open catch to inspect/propagate
permission/ENOENT/EROFS/EIO/name-too-long cases and update the Compressor::open
catch to distinguish allocation/parameter/OOM errors (or rethrow the original
exception) so callers receive accurate failure reasons while still using
nested_writers and the LogSerializer constructor.
components/core/src/clp_s/log_converter/LogSerializer.hpp (1)

81-95: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

close() finalization remains opt-in and bypassable.

close() is the only path that writes the EOF marker and runs Compressor::close() / FileWriter::close() (via dynamic_cast). Because the destructor is = default, any TRY*/error return after create() succeeds (or any unexpected throw from add_message/flush_buffer callers) will skip this method, leaving a half-written, EOF-less, possibly-truncated .clp/.clp.zst file in the destination directory that downstream readers cannot reliably interpret. Please move to an abort/commit lifecycle (e.g., write to a temp filename and rename on successful close(), delete on destruction if uncommitted) so partial outputs are never observable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/core/src/clp_s/log_converter/LogSerializer.hpp` around lines 81 -
95, The close() path currently is optional and can be skipped, leaving
incomplete output; modify the lifecycle to an explicit abort/commit model: have
create() open a temporary target (e.g., same name + ".tmp") and set an internal
"committed" flag false; ensure close() writes the EOF via
m_nested_writers.back()->write_numeric_value(...), calls flush_buffer(), invokes
dynamic_casted Compressor::close() / FileWriter::close() on entries in
m_nested_writers, then atomically rename the temp file to the final filename and
set "committed" true; implement a destructor that checks "committed" and if
false deletes the temp file (or calls an abort() that closes any open handles
without writing EOF and removes temp); ensure add_message/flush_buffer errors
leave state consistent (close/abort safe to call) and document the new behavior
in create(), close(), and the destructor; reference functions/fields: close(),
flush_buffer(), m_nested_writers, Compressor, FileWriter, create(), add_message,
and the defaulted destructor so reviewers can locate and change the code.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@components/core/src/clp_s/log_converter/LogSerializer.cpp`:
- Around line 53-71: The current catch-all handlers around FileWriter::open and
zstd::Compressor::open swallow exception details and map every failure to a
single std::errc; change them to preserve and map the original error: catch the
concrete exception types thrown by clp (e.g., clp::FileWriter::OperationFailed
or clp::TraceableException) and extract error info (errno, error code, or
what()) to translate to a more specific std::errc (or return a richer error
type) before returning; update the FileWriter::open catch to inspect/propagate
permission/ENOENT/EROFS/EIO/name-too-long cases and update the Compressor::open
catch to distinguish allocation/parameter/OOM errors (or rethrow the original
exception) so callers receive accurate failure reasons while still using
nested_writers and the LogSerializer constructor.

In `@components/core/src/clp_s/log_converter/LogSerializer.hpp`:
- Around line 81-95: The close() path currently is optional and can be skipped,
leaving incomplete output; modify the lifecycle to an explicit abort/commit
model: have create() open a temporary target (e.g., same name + ".tmp") and set
an internal "committed" flag false; ensure close() writes the EOF via
m_nested_writers.back()->write_numeric_value(...), calls flush_buffer(), invokes
dynamic_casted Compressor::close() / FileWriter::close() on entries in
m_nested_writers, then atomically rename the temp file to the final filename and
set "committed" true; implement a destructor that checks "committed" and if
false deletes the temp file (or calls an abort() that closes any open handles
without writing EOF and removes temp); ensure add_message/flush_buffer errors
leave state consistent (close/abort safe to call) and document the new behavior
in create(), close(), and the destructor; reference functions/fields: close(),
flush_buffer(), m_nested_writers, Compressor, FileWriter, create(), add_message,
and the defaulted destructor so reviewers can locate and change the code.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9f5947e6-f24f-4ce3-b915-e949ec7d7de1

📥 Commits

Reviewing files that changed from the base of the PR and between 7230434 and b73d0fc.

📒 Files selected for processing (3)
  • components/core/src/clp_s/CMakeLists.txt
  • components/core/src/clp_s/log_converter/LogSerializer.cpp
  • components/core/src/clp_s/log_converter/LogSerializer.hpp

@gibber9809 gibber9809 requested a review from LinZhihao-723 May 7, 2026 14:47
Copy link
Copy Markdown
Contributor

@20001020ycx 20001020ycx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, good work, just a minor nit and a design question from myself.

void flush_buffer() {
auto const buffer{m_serializer.get_ir_buf_view()};
m_writer.write(
m_nested_writers.back()->write(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit confused on the order of the component in the pipeline. Looks like the m_nested_writers vector is defined in the order of [FileWriter, Compressor], given that you did emplace_back at create. When zstd is on, .back() resolves to Compressor, which means flush_buffer() now writes to Compressor rather than FileWriter. Does this change the semantic of this function?

Furthermore, could we define the order of the expected writer chain at the m_nested_writers declaration? I feel like this PR assumes some order of the m_nested_writers in coding, I think this would help in case we add more components in the future?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I can update the docs to be clear about the expectation for nested writers. The intention is that the writers are in an order like:
output sink writer <- nested writer 1 <- nested writer 2, etc.

The semantic of the flush_buffer function is that it's supposed to write the the buffered output from the IR serializer to some output sink. Both the previous implementation and this implementation don't flush the output sink at this time, so there's no semantic change w.r.t. durability.


boost::uuids::random_generator uuid_generator;
std::string const file_name{boost::uuids::to_string(uuid_generator()) + ".clp"};
auto file_extension{use_zstd ? clp::ir::cIrFileExtension : cDefaultIRFileExtension};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, feel like this import clp:ir:cIrFileExtension doesn't convey the compression we will perform, but probably this is outside the scopeof this PR to update this as I assume there would be many uses of this constant. Maybe name cDefaultIrFileExtension to cUncompressedFileExtension.

Emmmm, I will leave it to you, I am okay with either, just noticed while reading through the code, lol.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah cUncompressedFileExtension is more readable, will update.

@gibber9809 gibber9809 requested a review from 20001020ycx May 14, 2026 20:58
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/core/src/clp_s/log_converter/LogSerializer.cpp`:
- Line 67: Replace the unnecessary .get() dereference when passing the
unique_ptr target to compressor->open: change the call using
nested_writers.back().get() to directly dereference the unique_ptr (use
*nested_writers.back()) so compressor->open receives the referenced object; look
for the expression compressor->open(*nested_writers.back().get()) in
LogSerializer.cpp and update it to compressor->open(*nested_writers.back()) to
remove the redundant .get().
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: dbe6527c-a4c7-4c82-8406-bf0a509596a0

📥 Commits

Reviewing files that changed from the base of the PR and between b73d0fc and 12ee9b6.

📒 Files selected for processing (3)
  • components/core/src/clp_s/CMakeLists.txt
  • components/core/src/clp_s/log_converter/LogSerializer.cpp
  • components/core/src/clp_s/log_converter/LogSerializer.hpp


try {
auto compressor{std::make_unique<clp::streaming_compression::zstd::Compressor>()};
compressor->open(*nested_writers.back().get());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | 💤 Low value

Redundant .get() when dereferencing a unique_ptr.

nested_writers.back() already yields a std::unique_ptr<...>&, which can be dereferenced directly. The .get() call is unnecessary.

♻️ Proposed tweak
-        compressor->open(*nested_writers.back().get());
+        compressor->open(*nested_writers.back());
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/core/src/clp_s/log_converter/LogSerializer.cpp` at line 67,
Replace the unnecessary .get() dereference when passing the unique_ptr target to
compressor->open: change the call using nested_writers.back().get() to directly
dereference the unique_ptr (use *nested_writers.back()) so compressor->open
receives the referenced object; look for the expression
compressor->open(*nested_writers.back().get()) in LogSerializer.cpp and update
it to compressor->open(*nested_writers.back()) to remove the redundant .get().

20001020ycx
20001020ycx previously approved these changes May 14, 2026
Copy link
Copy Markdown
Contributor

@20001020ycx 20001020ycx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread components/core/src/clp_s/log_converter/CommandLineArguments.cpp Outdated
* Creates an instance of `LogSerializer`.
* @param output_dir The destination directory for generated KV-IR.
* @param original_file_path The original path for the file being converted to KV-IR.
* @param use_zstd Whether the output KV-IR should be zstd-compressed.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about compress_with_zstd? Feels a bit more specific.

m_writer.close();
m_nested_writers.back()->write_numeric_value(clp::ffi::ir_stream::cProtocol::Eof);
for (auto it{m_nested_writers.rbegin()}; it != m_nested_writers.rend(); ++it) {
if (auto compressor{dynamic_cast<clp::streaming_compression::Compressor*>(it->get())};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we open an issue about this? If one already exists, can we link it in the PR description?

Comment thread components/core/src/clp_s/log_converter/LogSerializer.hpp Outdated
Comment thread components/core/src/clp_s/log_converter/LogSerializer.hpp
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
@gibber9809 gibber9809 requested a review from kirkrodrigues May 21, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants