Skip to content

chore: copy corrupted WAL and docs to .broken dir#395

Open
cheb0 wants to merge 1 commit intomainfrom
0-store-corrupted-wal-files
Open

chore: copy corrupted WAL and docs to .broken dir#395
cheb0 wants to merge 1 commit intomainfrom
0-store-corrupted-wal-files

Conversation

@cheb0
Copy link
Copy Markdown
Collaborator

@cheb0 cheb0 commented Apr 2, 2026

Description

If WAL file is corrupted, then increment a metric and copy to a separate directory .broken


  • I have read and followed all requirements in CONTRIBUTING.md;
  • I used LLM/AI assistance to make this pull request;

@cheb0 cheb0 requested a review from eguguchkin April 2, 2026 06:28
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 18.18182% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.19%. Comparing base (5115f7b) to head (a6ce63a).

Files with missing lines Patch % Lines
frac/active.go 8.69% 20 Missing and 1 partial ⚠️
util/fs.go 0.00% 13 Missing ⚠️
storage/wal_reader.go 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #395      +/-   ##
==========================================
- Coverage   71.28%   71.19%   -0.09%     
==========================================
  Files         210      210              
  Lines       15579    15618      +39     
==========================================
+ Hits        11105    11120      +15     
- Misses       3673     3698      +25     
+ Partials      801      800       -1     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread util/fs.go
}
defer in.Close()

out, err := os.OpenFile(dst, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o666)
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.

Why write-only? I mean this is not a good default for a such generic function CopyFile.

Comment thread util/fs.go
if err != nil {
return err
}

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.

defer out.Close() instead of manually closing the file?

@eguguchkin eguguchkin requested review from eguguchkin and moflotas and removed request for eguguchkin April 6, 2026 10:26
@eguguchkin eguguchkin added this to the v0.71.0 milestone Apr 13, 2026
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.

5 participants