use utils::failpoint_sleep_millis_async!("attach-before-activate")

The detach_while_attaching test still passes, presumably because
the two request execute on different OS threads.
This commit is contained in:
Christian Schwarz
2022-11-24 07:34:03 -05:00
committed by Christian Schwarz
parent 791eebefe2
commit 1022b4b98f
2 changed files with 2 additions and 4 deletions

View File

@@ -640,9 +640,7 @@ impl Tenant {
crashsafe::fsync(marker_file.parent().expect("marker file has parent dir"))
.context("fsync tenant directory after unlinking attach marker file")?;
fail::fail_point!("attach-before-activate", |_| {
anyhow::bail!("failpoint attach-beore-activate");
});
utils::failpoint_sleep_millis_async!("attach-before-activate");
// Start background operations and open the tenant for business.
// The loops will shut themselves down when they notice that the tenant is inactive.

View File

@@ -153,7 +153,7 @@ def test_detach_while_attaching(
pageserver_http.tenant_detach(tenant_id)
# And re-attach
pageserver_http.configure_failpoints([("attach-before-activate", "sleep(5000)")])
pageserver_http.configure_failpoints([("attach-before-activate", "return(5000)")])
pageserver_http.tenant_attach(tenant_id)