mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 09:52:54 +00:00
refactor: simplify, racy removes no longer intended
This commit is contained in:
@@ -1592,26 +1592,11 @@ impl Tenant {
|
||||
}));
|
||||
|
||||
match removed_timeline {
|
||||
Ok(None) => {
|
||||
// This can legitimately happen if there's a concurrent call to this function.
|
||||
// T1 T2
|
||||
// lock
|
||||
// unlock
|
||||
// lock
|
||||
// unlock
|
||||
// remove files
|
||||
// lock
|
||||
// remove from map
|
||||
// unlock
|
||||
// return
|
||||
// remove files
|
||||
// lock
|
||||
// remove from map observes empty map
|
||||
// unlock
|
||||
// return
|
||||
debug!("concurrent call to this function won the race");
|
||||
}
|
||||
Ok(Some(_)) => {}
|
||||
Ok(None) => {
|
||||
// with SharedRetryable this should no longer happen
|
||||
warn!("no other task should had dropped the Timeline");
|
||||
}
|
||||
Err(_panic) => return Err(InnerDeleteTimelineError::DeletedGrewChildren),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user