Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework tenant attach code to share the initialization code path with tenant load #3466

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pageserver/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use utils::{

use crate::tenant::config::TenantConf;
use crate::tenant::config::TenantConfOpt;
use crate::tenant::{TENANT_ATTACHING_MARKER_FILENAME, TIMELINES_SEGMENT_NAME};
use crate::tenant::{TENANT_ATTACHING_MARKER_SUFFIX, TIMELINES_SEGMENT_NAME};
use crate::{
IGNORED_TENANT_FILE_NAME, METADATA_FILE_NAME, TENANT_CONFIG_NAME, TIMELINE_UNINIT_MARK_SUFFIX,
};
Expand Down Expand Up @@ -459,8 +459,7 @@ impl PageServerConf {
}

pub fn tenant_attaching_mark_file_path(&self, tenant_id: &TenantId) -> PathBuf {
self.tenant_path(tenant_id)
.join(TENANT_ATTACHING_MARKER_FILENAME)
path_with_suffix_extension(self.tenant_path(tenant_id), TENANT_ATTACHING_MARKER_SUFFIX)
}

pub fn tenant_ignore_mark_file_path(&self, tenant_id: TenantId) -> PathBuf {
Expand Down
12 changes: 9 additions & 3 deletions pageserver/src/task_mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,17 @@ pub enum TaskKind {
// Task that downloads a file from remote storage
RemoteDownloadTask,

// task that handles the initial downloading of all tenants
InitialLoad,
// task that handles loading of a tenant during pageserver startup
TenantLoadStartup,

// task that handles loading of a tenant in response to a /load HTTP API request
TenantLoadApi,

// task that handles loading of a tenant as part of the tenant creation procedure
TenantLoadCreate,

// task that handles attaching a tenant
Attach,
TenantAttach,

// task that handhes metrics collection
MetricsCollection,
Expand Down
Loading