Skip to content

Conversation

atimin
Copy link
Member

@atimin atimin commented Aug 22, 2025

Closes #

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md has been updated (for bug fixes / features / docs)

What kind of change does this PR introduce?

Bug fix

What was changed?

Patch #909 caused corruption of the transaction log due to double synchronization in the Drop implementation. The PR removes the Drop implementation and adds an integrity test to detect broken replication at the beginning. This may help to understand how the log breaks in #898.

Related issues

#909
#898

Does this PR introduce a breaking change?

No

Other information:

@atimin atimin changed the title add integrity checks and remove double sync Fix double synchronization of transaction log + integrity checks Aug 22, 2025
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

❌ Patch coverage is 98.36066% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.36%. Comparing base (68cd337) to head (998478e).
⚠️ Report is 1 commits behind head on stable.

Files with missing lines Patch % Lines
reductstore/src/replication/replication_task.rs 94.11% 1 Missing ⚠️
@@            Coverage Diff             @@
##           stable     #912      +/-   ##
==========================================
+ Coverage   95.34%   95.36%   +0.01%     
==========================================
  Files         167      167              
  Lines       10159    10195      +36     
==========================================
+ Hits         9686     9722      +36     
  Misses        473      473              
Files with missing lines Coverage Δ
reductstore/src/replication/replication_sender.rs 98.97% <100.00%> (+<0.01%) ⬆️
reductstore/src/replication/transaction_log.rs 100.00% <100.00%> (ø)
reductstore/src/replication/replication_task.rs 96.62% <94.11%> (+0.13%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@atimin atimin requested a review from Copilot August 22, 2025 18:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Fixes a critical bug that caused transaction log corruption due to double synchronization in the Drop implementation. The PR removes the problematic Drop implementation and adds integrity validation to detect broken replication logs early.

Key changes:

  • Removed the Drop implementation from TransactionLog that was causing double synchronization
  • Added comprehensive integrity checks to validate transaction log state during loading
  • Updated function signature to accept path by reference instead of ownership

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
reductstore/src/replication/transaction_log.rs Removed Drop implementation, added integrity validation, changed path parameter handling
reductstore/src/replication/replication_task.rs Updated to handle integrity check failures with fallback log recreation
reductstore/src/replication/replication_sender.rs Updated function call to match new signature
CHANGELOG.md Added entry for the bug fix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@atimin atimin merged commit 83607ce into stable Aug 22, 2025
100 of 113 checks passed
@atimin atimin deleted the fix-duble-sync-and-integrity branch August 22, 2025 19:15
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.

1 participant