diff --git a/pageserver/src/tenant/timeline/layer_manager.rs b/pageserver/src/tenant/timeline/layer_manager.rs index 6999678bae..828e202912 100644 --- a/pageserver/src/tenant/timeline/layer_manager.rs +++ b/pageserver/src/tenant/timeline/layer_manager.rs @@ -45,8 +45,7 @@ struct LayerSnapshot { pub struct LayerManagerReadGuard { snapshot: LayerSnapshot, /// Mock the behavior of the layer map lock. - #[allow(dead_code)] - pseudo_lock: tokio::sync::OwnedRwLockReadGuard<()>, + _pseudo_lock: tokio::sync::OwnedRwLockReadGuard<()>, } pub struct LayerManagerWriteGuard { @@ -54,8 +53,7 @@ pub struct LayerManagerWriteGuard { /// Semantic layer operations will need to modify the layer content. layer_manager: Arc, /// Mock the behavior of the layer map lock. - #[allow(dead_code)] - pseudo_lock: tokio::sync::OwnedRwLockWriteGuard<()>, + _pseudo_lock: tokio::sync::OwnedRwLockWriteGuard<()>, } impl LayerManager { @@ -78,11 +76,11 @@ impl LayerManager { layer_map: self.layer_map.load_full(), layer_fmgr: Arc::clone(&self.layer_fmgr), }, - pseudo_lock, + _pseudo_lock: pseudo_lock, } } - /// Take the snapshot of the layer map and return a write guard. The read guard will prevent + /// Take the snapshot of the layer map and return a write guard. The write guard will prevent /// the layer map from being read. pub async fn write(self: &Arc) -> LayerManagerWriteGuard { // take the lock before taking snapshot @@ -92,7 +90,7 @@ impl LayerManager { layer_map: self.layer_map.load_full(), layer_fmgr: Arc::clone(&self.layer_fmgr), }, - pseudo_lock, + _pseudo_lock: pseudo_lock, layer_manager: self.clone(), } } @@ -108,13 +106,13 @@ impl LayerManager { layer_map: self.layer_map.load_full(), layer_fmgr: Arc::clone(&self.layer_fmgr), }, - pseudo_lock, + _pseudo_lock: pseudo_lock, layer_manager: self.clone(), }) } /// Make an update to the layer map. This function will NOT take the state lock and should ONLY - /// be used when there is not known concurrency when initializing the layer map. Error will be returned only when + /// be used when there is not known concurrency when initializing the layer map. Error will be returned only if /// the update function fails. fn initialize_update(&self, f: impl FnOnce(LayerMap) -> Result) -> Result<()> { let snapshot = self.layer_map.load_full(); @@ -128,7 +126,7 @@ impl LayerManager { Ok(()) } - /// Make an update to the layer map. Error will be returned only when the update function fails. + /// Make an update to the layer map. Error will be returned only if the update function fails. async fn update(&self, f: impl FnOnce(LayerMap) -> Result<(LayerMap, T)>) -> Result { let _guard = self.state_lock.lock().await; let snapshot = self.layer_map.load_full(); @@ -177,7 +175,7 @@ impl LayerManagerWriteGuard { /// code path where we need to check if a layer already exists on disk. With the immutable layer /// map design, it is possible that the layer map snapshot does not contain the layer, but the layer file /// manager does. Therefore, use this function with caution. - pub(crate) fn contains(&self, layer: &Arc) -> bool { + pub(super) fn contains(&self, layer: &Arc) -> bool { self.snapshot.contains(layer) } diff --git a/vendor/postgres-v14 b/vendor/postgres-v14 index 12c5dc8281..28bf5ccfa2 160000 --- a/vendor/postgres-v14 +++ b/vendor/postgres-v14 @@ -1 +1 @@ -Subproject commit 12c5dc8281d20b5bd636e1097eea80a7bc609591 +Subproject commit 28bf5ccfa2fda9677566a25abd450e714d9ed055 diff --git a/vendor/postgres-v15 b/vendor/postgres-v15 index e3fbfc4d14..553f2d3618 160000 --- a/vendor/postgres-v15 +++ b/vendor/postgres-v15 @@ -1 +1 @@ -Subproject commit e3fbfc4d143b2d3c3c1813ce747f8af35aa9405e +Subproject commit 553f2d3618a6d4893bde67f1c065926ee8a3a118