Skip to content

Conversation

@OussamaSaoudi
Copy link
Collaborator

@OussamaSaoudi OussamaSaoudi commented Nov 19, 2025

🥞 Stacked PR

Use this link to review incremental changes.


What changes are proposed in this pull request?

This PR adds the commit logreader, a module that will hold all the logic for processing commit files when performing log replay.

  • CommitReader reads the delta log using the commit cover.
  • CommitReader implements Iterator<Item = ActionBatch>.
  • CommitReader can read using an arbitrary log schema.

How was this change tested?

This is tested with the app-txn-no-checkpoint which has multiple commits and multiple add actions in each commit. We ensure that the CommitReader reads the correct set of add actions.

@OussamaSaoudi OussamaSaoudi marked this pull request as draft November 20, 2025 18:24
@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 86.11111% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.77%. Comparing base (72cb27c) to head (fd419c8).

Files with missing lines Patch % Lines
kernel/src/log_reader/commit.rs 86.76% 1 Missing and 8 partials ⚠️
kernel/src/log_segment.rs 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1499   +/-   ##
=======================================
  Coverage   84.77%   84.77%           
=======================================
  Files         126      127    +1     
  Lines       35679    35739   +60     
  Branches    35679    35739   +60     
=======================================
+ Hits        30246    30297   +51     
- Misses       3965     3966    +1     
- Partials     1468     1476    +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@OussamaSaoudi OussamaSaoudi marked this pull request as ready for review November 24, 2025 18:56
Copy link
Member

@nicklan nicklan left a comment

Choose a reason for hiding this comment

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

lgtm! one small comment

use std::sync::Arc;
use url::Url;

fn load_test_table(
Copy link
Member

Choose a reason for hiding this comment

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

should this move into test_utils? I feel like we load test tables in a few places. If there's not already a central way to do so, maybe just make a good first issue to clean that up?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah I ended up moving this to test_utils in the following PR because I noticed the repetition.

let actions = engine
.json_handler()
.read_json_files(&commit_files, schema, None)?
.map(|batch| batch.map(|b| ActionsBatch::new(b, true)));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Itertools::map_ok?

Suggested change
.map(|batch| batch.map(|b| ActionsBatch::new(b, true)));
.map_ok(|batch| ActionsBatch::new(batch, true));

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