mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-09 06:22:57 +00:00
Move LayeredTimeline and related code to separate source file.
The layered_repository.rs file had grown to be very large. Split off the LayeredTimeline struct and related code to a separate source file to make it more manageable. There are plans to move much of the code to track timelines from tenant_mgr.rs to LayeredRepository. That will make layered_repository.rs grow again, so now is a good time to split it. There's a lot more cleanup to do, but this commit intentionally only moves existing code and avoids doing anything else, for easier review.
This commit is contained in:
committed by
Heikki Linnakangas
parent
172314155e
commit
d301b8364c
File diff suppressed because it is too large
Load Diff
@@ -10,9 +10,9 @@
|
||||
//! corresponding files are written to disk.
|
||||
//!
|
||||
|
||||
use crate::layered_repository::inmemory_layer::InMemoryLayer;
|
||||
use crate::layered_repository::storage_layer::Layer;
|
||||
use crate::layered_repository::storage_layer::{range_eq, range_overlaps};
|
||||
use crate::layered_repository::InMemoryLayer;
|
||||
use crate::repository::Key;
|
||||
use anyhow::Result;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
2021
pageserver/src/layered_repository/timeline.rs
Normal file
2021
pageserver/src/layered_repository/timeline.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -176,7 +176,6 @@ use crate::{
|
||||
layered_repository::{
|
||||
ephemeral_file::is_ephemeral_file,
|
||||
metadata::{metadata_path, TimelineMetadata, METADATA_FILE_NAME},
|
||||
LayeredRepository,
|
||||
},
|
||||
storage_sync::{self, index::RemoteIndex},
|
||||
tenant_mgr::attach_downloaded_tenants,
|
||||
@@ -1257,7 +1256,13 @@ async fn update_local_metadata(
|
||||
timeline_id,
|
||||
} = sync_id;
|
||||
tokio::task::spawn_blocking(move || {
|
||||
LayeredRepository::save_metadata(conf, timeline_id, tenant_id, &cloned_metadata, true)
|
||||
crate::layered_repository::save_metadata(
|
||||
conf,
|
||||
timeline_id,
|
||||
tenant_id,
|
||||
&cloned_metadata,
|
||||
true,
|
||||
)
|
||||
})
|
||||
.await
|
||||
.with_context(|| {
|
||||
|
||||
Reference in New Issue
Block a user