From e0146304e694bcbe7fe3bee9b1e9321c87a94cfb Mon Sep 17 00:00:00 2001 From: Eric Seppanen Date: Tue, 18 May 2021 14:45:00 -0700 Subject: [PATCH] timeline: make SharedState and some constructors private This was pointed out in code review: no need for these to be public. --- walkeeper/src/timeline.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/walkeeper/src/timeline.rs b/walkeeper/src/timeline.rs index 07cad4c081..70cf0d5bf0 100644 --- a/walkeeper/src/timeline.rs +++ b/walkeeper/src/timeline.rs @@ -22,19 +22,19 @@ use crate::WalAcceptorConf; /// Shared state associated with database instance (tenant) #[derive(Debug)] -pub struct SharedState { +struct SharedState { /// quorum commit LSN - pub commit_lsn: Lsn, + commit_lsn: Lsn, /// information about this safekeeper - pub info: SafeKeeperInfo, + info: SafeKeeperInfo, /// opened file control file handle (needed to hold exlusive file lock - pub control_file: Option, + control_file: Option, /// combined hot standby feedback from all replicas - pub hs_feedback: HotStandbyFeedback, + hs_feedback: HotStandbyFeedback, } impl SharedState { - pub fn new() -> Self { + fn new() -> Self { Self { commit_lsn: Lsn(0), info: SafeKeeperInfo::new(), @@ -141,7 +141,7 @@ pub struct Timeline { } impl Timeline { - pub fn new(timelineid: ZTimelineId, shared_state: SharedState) -> Timeline { + fn new(timelineid: ZTimelineId, shared_state: SharedState) -> Timeline { Timeline { timelineid, mutex: Mutex::new(shared_state),