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:
Heikki Linnakangas
2022-10-11 14:48:04 +03:00
committed by Heikki Linnakangas
parent 676c63c329
commit e5e40a31f4
4 changed files with 4 additions and 4 deletions

View File

@@ -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,

View File

@@ -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.
"""

View File

@@ -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)

View File

@@ -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 = (