Skip to content

Commit

Permalink
Fix merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ctring committed Apr 20, 2023
1 parent 52b780d commit 38fbd82
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 39 deletions.
13 changes: 0 additions & 13 deletions control_plane/src/bin/neon_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,19 +663,6 @@ fn handle_endpoint(ep_match: &ArgMatches, env: &local_env::LocalEnv) -> Result<(
.copied()
.context("Failed to parse postgres version from the argument string")?;

let region_timeline_ids = sub_args
.get_many::<String>("regions")
.map(|regions| {
regions
.map(|r| {
env.get_branch_timeline_id(r, tenant_id).ok_or_else(|| {
anyhow!("Found no timeline id for branch name '{}'", r)
})
})
.collect()
})
.transpose()?;

cplane.new_endpoint(
tenant_id,
&endpoint_id,
Expand Down
25 changes: 0 additions & 25 deletions control_plane/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,6 @@ impl ComputeControlPlane {
) -> Result<Arc<Endpoint>> {
let port = port.unwrap_or_else(|| self.get_port());

let multi_region = region_timeline_ids
.map(|timeline_ids| -> Result<_> {
let current_region = timeline_ids
.iter()
.position(|&id| id == timeline_id)
.ok_or_else(|| {
anyhow::anyhow!(
"Found no timeline id '{}' in the list of region timeline ids",
timeline_id
)
})?;
Ok(MultiRegion {
timeline_ids,
current_region,
})
})
.transpose()?;

let ep = Arc::new(Endpoint {
name: name.to_owned(),
address: SocketAddr::new("127.0.0.1".parse().unwrap(), port),
Expand All @@ -117,12 +99,6 @@ impl ComputeControlPlane {

///////////////////////////////////////////////////////////////////////////////

#[derive(Debug)]
struct MultiRegion {
timeline_ids: Vec<TimelineId>,
current_region: usize,
}

#[derive(Debug)]
pub struct Endpoint {
/// used as the directory name
Expand Down Expand Up @@ -174,7 +150,6 @@ impl Endpoint {
let timeline_id: TimelineId = conf.parse_field("neon.timeline_id", &context)?;
let tenant_id: TenantId = conf.parse_field("neon.tenant_id", &context)?;

let region_timelines = conf.parse_field("neon.region_timelines", &context);
let current_region = conf
.parse_field("current_region", &context)
.unwrap_or_default();
Expand Down
2 changes: 1 addition & 1 deletion pageserver/src/tenant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2131,8 +2131,8 @@ impl Tenant {
src_timeline: &Arc<Timeline>,
dst_id: TimelineId,
start_lsn: Option<Lsn>,
ctx: &RequestContext,
region_id: RegionId,
ctx: &RequestContext,
) -> anyhow::Result<Arc<Timeline>> {
let src_id = src_timeline.timeline_id;

Expand Down

0 comments on commit 38fbd82

Please sign in to comment.