You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some reminders before you submit the pull request
Add tests for the change
Document changes
Reference the link of issue using fixes eloqdb/eloqstore#issue_id
Reference the link of RFC if exists
Pass ctest --test-dir build/tests/
Summary by CodeRabbit
Refactor
Internal improvements to batch write task processing. Refactored core state management and metadata tracking mechanisms to enhance code efficiency, maintainability, and overall system architecture. Changes streamline internal operations, optimize data flow patterns, and improve code quality while fully preserving all existing user-facing functionality and behavior.
The pull request removes the DirtyIndexPage helper struct from BatchWriteTask and refactors the FinishIndexPage method signature to accept three separate out-parameters (MemIndexPage*&, std::string&, PageId&) instead of a struct reference, with corresponding updates throughout the implementation.
Removed DirtyIndexPage struct and updated FinishIndexPage method signature to replace struct parameter with three explicit out-parameters for previous page pointer, key, and page ID.
Updated all call sites and internal logic to use explicit prev_page, prev_key, and prev_page_id variables instead of DirtyIndexPage struct fields; modified Pop(), FinishIndexPage(), FlushIndexPage(), and redistribution logic to manage previous page metadata as individual parameters.
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
#328 — Directly related refactoring of DirtyIndexPage handling; this PR removes the struct entirely while the other modifies its destructor to address double-free issues.
Suggested reviewers
thweetkomputer
Poem
🐰 The wrapper struct bid farewell today,
As pointers and refs found a clearer way,
No more nested fields in a bundle tight,
Just metadata flowing, explicit and right!
Three parameters dance where one struct stood—
A refactor that's clean and solidly good! ✨
The pull request description contains only a bare checklist template with no actual description of the code changes, why they're needed, or what was modified.
Add a detailed description explaining the motivation for removing DirtyIndexPage, the specific changes made (method signature updates, struct removal), and any migration notes for call sites.
Docstring Coverage
⚠️ Warning
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name
Status
Explanation
Title check
✅ Passed
The title 'remove dirty Index Page' directly describes the main change: removing the DirtyIndexPage helper struct and refactoring related code to use explicit parameters.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
📝 Generate docstrings
🧪 Generate unit tests (beta)
Create PR with unit tests
Post copyable unit tests in a comment
Commit unit tests in branch remove_dirty
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here are some reminders before you submit the pull request
fixes eloqdb/eloqstore#issue_idctest --test-dir build/tests/Summary by CodeRabbit