mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 14:02:55 +00:00
Clean up terms "delete timeline" and "detach tenant".
You cannot attach/detach an individual timeline, attach/detach always applies to the whole tenant. However, you can *delete* a single timeline from a tenant. Fix some comments and error messages that confused these two operations.
This commit is contained in:
committed by
Heikki Linnakangas
parent
676c63c329
commit
e5e40a31f4
@@ -346,7 +346,7 @@ impl Tenant {
|
||||
|
||||
ensure!(
|
||||
!children_exist,
|
||||
"Cannot detach timeline which has child timelines"
|
||||
"Cannot delete timeline which has child timelines"
|
||||
);
|
||||
let timeline_entry = match timelines.entry(timeline_id) {
|
||||
Entry::Occupied(e) => e,
|
||||
|
||||
@@ -39,7 +39,7 @@ def test_normal_work(neon_env_builder: NeonEnvBuilder, num_timelines: int, num_s
|
||||
* restart compute
|
||||
* check that the data is there
|
||||
* stop compute
|
||||
* detach timeline
|
||||
* detach tenant
|
||||
|
||||
Repeat check for several tenants/timelines.
|
||||
"""
|
||||
|
||||
@@ -70,7 +70,7 @@ def test_tenant_detach_smoke(neon_env_builder: NeonEnvBuilder):
|
||||
break
|
||||
# else is called if the loop finished without reaching "break"
|
||||
else:
|
||||
pytest.fail(f"could not detach timeline: {last_error}")
|
||||
pytest.fail(f"could not detach tenant: {last_error}")
|
||||
|
||||
gc_thread.join(timeout=10)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ def test_timeline_delete(neon_simple_env: NeonEnv):
|
||||
|
||||
ps_http = env.pageserver.http_client()
|
||||
with pytest.raises(
|
||||
NeonPageserverApiException, match="Cannot detach timeline which has child timelines"
|
||||
NeonPageserverApiException, match="Cannot delete timeline which has child timelines"
|
||||
):
|
||||
|
||||
timeline_path = (
|
||||
|
||||
Reference in New Issue
Block a user