mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-27 18:10:37 +00:00
make launch_wal_receiver infallible
This commit is contained in:
committed by
Dmitry Rodionov
parent
30984c163c
commit
cca1ace651
@@ -191,9 +191,7 @@ impl UninitializedTimeline<'_> {
|
||||
)
|
||||
})?;
|
||||
v.insert(Arc::clone(&new_timeline));
|
||||
new_timeline.launch_wal_receiver().with_context(|| {
|
||||
format!("Failed to launch walreceiver for timeline {tenant_id}/{timeline_id}")
|
||||
})?;
|
||||
new_timeline.launch_wal_receiver();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -602,11 +602,11 @@ impl Timeline {
|
||||
result
|
||||
}
|
||||
|
||||
pub fn launch_wal_receiver(self: &Arc<Self>) -> anyhow::Result<()> {
|
||||
pub fn launch_wal_receiver(self: &Arc<Self>) {
|
||||
if !is_etcd_client_initialized() {
|
||||
if cfg!(test) {
|
||||
info!("not launching WAL receiver because etcd client hasn't been initialized");
|
||||
return Ok(());
|
||||
return;
|
||||
} else {
|
||||
panic!("etcd client not initialized");
|
||||
}
|
||||
@@ -634,9 +634,7 @@ impl Timeline {
|
||||
walreceiver_connect_timeout,
|
||||
lagging_wal_timeout,
|
||||
max_lsn_wal_lag,
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
);
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
@@ -47,7 +47,7 @@ pub fn spawn_connection_manager_task(
|
||||
wal_connect_timeout: Duration,
|
||||
lagging_wal_timeout: Duration,
|
||||
max_lsn_wal_lag: NonZeroU64,
|
||||
) -> anyhow::Result<()> {
|
||||
) {
|
||||
let mut etcd_client = get_etcd_client().clone();
|
||||
|
||||
let tenant_id = timeline.tenant_id;
|
||||
@@ -95,7 +95,6 @@ pub fn spawn_connection_manager_task(
|
||||
info_span!("wal_connection_manager", tenant = %tenant_id, timeline = %timeline_id),
|
||||
),
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Attempts to subscribe for timeline updates, pushed by safekeepers into the broker.
|
||||
|
||||
Reference in New Issue
Block a user