Skip to content

Commit

Permalink
Improve CrashsafeOverwriteError source printing (#5410)
Browse files Browse the repository at this point in the history
## Problem

Duplication of error in log

Fixes #5366 

## Summary of changes

Removed `{0}` from error description above each enum due to presence of
`#[source]` to avoid duplication

Signed-off-by: Rahul Modpur <[email protected]>
  • Loading branch information
rmodpur authored Oct 4, 2023
1 parent fec94ad commit af6a20d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pageserver/src/virtual_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ impl OpenFiles {
pub enum CrashsafeOverwriteError {
#[error("final path has no parent dir")]
FinalPathHasNoParentDir,
#[error("remove tempfile: {0}")]
#[error("remove tempfile")]
RemovePreviousTempfile(#[source] std::io::Error),
#[error("create tempfile: {0}")]
#[error("create tempfile")]
CreateTempfile(#[source] std::io::Error),
#[error("write tempfile: {0}")]
#[error("write tempfile")]
WriteContents(#[source] std::io::Error),
#[error("sync tempfile: {0}")]
#[error("sync tempfile")]
SyncTempfile(#[source] std::io::Error),
#[error("rename tempfile to final path: {0}")]
#[error("rename tempfile to final path")]
RenameTempfileToFinalPath(#[source] std::io::Error),
#[error("open final path parent dir: {0}")]
#[error("open final path parent dir")]
OpenFinalPathParentDir(#[source] std::io::Error),
#[error("sync final path parent dir: {0}")]
#[error("sync final path parent dir")]
SyncFinalPathParentDir(#[source] std::io::Error),
}
impl CrashsafeOverwriteError {
Expand Down

1 comment on commit af6a20d

@github-actions
Copy link

@github-actions github-actions bot commented on af6a20d Oct 4, 2023

Choose a reason for hiding this comment

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

2300 tests run: 2176 passed, 2 failed, 122 skipped (full report)


Failures on Postgres 14

  • test_heavy_write_workload[neon_off-10-5-5]: release
  • test_heavy_write_workload[neon_on-10-5-5]: release
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_heavy_write_workload[neon_off-10-5-5] or test_heavy_write_workload[neon_on-10-5-5]"
Flaky tests (2)

Postgres 16

  • test_delete_tenant_exercise_crash_safety_failpoints[Check.RETRY_WITHOUT_RESTART-mock_s3-tenant-delete-before-background-True]: debug
  • test_pageserver_recovery: release

Code coverage (full report)

  • functions: 53.3% (8080 of 15173 functions)
  • lines: 81.3% (47179 of 58053 lines)

The comment gets automatically updated with the latest test results
af6a20d at 2023-10-04T08:25:58.684Z :recycle:

Please sign in to comment.