From fc190a2a198d204ab923024c81fa440e582d022c Mon Sep 17 00:00:00 2001 From: Alex Chi Date: Tue, 13 Jun 2023 13:56:50 -0400 Subject: [PATCH] resolve merge conflicts Signed-off-by: Alex Chi --- pageserver/src/tenant/timeline.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pageserver/src/tenant/timeline.rs b/pageserver/src/tenant/timeline.rs index 2b223a18d1..d1848e0eb9 100644 --- a/pageserver/src/tenant/timeline.rs +++ b/pageserver/src/tenant/timeline.rs @@ -28,7 +28,7 @@ use std::ops::{Deref, Range}; use std::path::{Path, PathBuf}; use std::pin::pin; use std::sync::atomic::{AtomicI64, Ordering as AtomicOrdering}; -use std::sync::{Arc, Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard, Weak}; +use std::sync::{Arc, Mutex, RwLock, Weak}; use std::time::{Duration, Instant, SystemTime}; use crate::context::{DownloadBehavior, RequestContext}; @@ -181,13 +181,13 @@ impl LayerMapping { /// Temporary function for immutable storage state refactor, ensures we are dropping mutex guard instead of other things. /// Can be removed after all refactors are done. -fn drop_rlock(rlock: RwLockReadGuard<'_, T>) { +fn drop_rlock(rlock: tokio::sync::RwLockReadGuard<'_, T>) { drop(rlock) } /// Temporary function for immutable storage state refactor, ensures we are dropping mutex guard instead of other things. /// Can be removed after all refactors are done. -fn drop_wlock(rlock: RwLockWriteGuard<'_, T>) { +fn drop_wlock(rlock: tokio::sync::RwLockWriteGuard<'_, T>) { drop(rlock) } @@ -1677,7 +1677,7 @@ impl Timeline { let mut layers = self.layers.try_write().expect( "in the context where we call this function, no other task has access to the object", ); - layers.next_open_layer_at = Some(Lsn(start_lsn.0)); + layers.0.next_open_layer_at = Some(Lsn(start_lsn.0)); } /// @@ -2347,7 +2347,7 @@ impl Timeline { } } - fn find_layer(&self, layer_file_name: &str) -> Option> { + async fn find_layer(&self, layer_file_name: &str) -> Option> { let guard = self.layers.read().await; let (layers, mapping) = &*guard; for historic_layer in layers.iter_historic_layers() {