Skip to content

Commit

Permalink
safekeeper: remove unused WriteGuardSharedState::skip_update (#9699)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgrinaker authored Nov 8, 2024
1 parent ecca62a commit ab47804
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions safekeeper/src/timeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,11 @@ pub type ReadGuardSharedState<'a> = RwLockReadGuard<'a, SharedState>;
pub struct WriteGuardSharedState<'a> {
tli: Arc<Timeline>,
guard: RwLockWriteGuard<'a, SharedState>,
skip_update: bool,
}

impl<'a> WriteGuardSharedState<'a> {
fn new(tli: Arc<Timeline>, guard: RwLockWriteGuard<'a, SharedState>) -> Self {
WriteGuardSharedState {
tli,
guard,
skip_update: false,
}
WriteGuardSharedState { tli, guard }
}
}

Expand Down Expand Up @@ -159,12 +154,10 @@ impl Drop for WriteGuardSharedState<'_> {
}
});

if !self.skip_update {
// send notification about shared state update
self.tli.shared_state_version_tx.send_modify(|old| {
*old += 1;
});
}
// send notification about shared state update
self.tli.shared_state_version_tx.send_modify(|old| {
*old += 1;
});
}
}

Expand Down

1 comment on commit ab47804

@github-actions
Copy link

Choose a reason for hiding this comment

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

5355 tests run: 5132 passed, 1 failed, 222 skipped (full report)


Failures on Postgres 17

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_uploads_and_deletions[debug-pg17-legacy]"

Test coverage report is not available

The comment gets automatically updated with the latest test results
ab47804 at 2024-11-08T20:17:16.335Z :recycle:

Please sign in to comment.