From a82a02fea0b2a56939c750dff28a86bdaad4db13 Mon Sep 17 00:00:00 2001 From: CAJan93 Date: Wed, 13 Mar 2024 17:32:25 +0100 Subject: [PATCH] feat(fix): Avoid exit 1 in risectl if ignore not found (CLOUD-2493) (#15665) --- src/ctl/src/cmd_impl/meta/reschedule.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ctl/src/cmd_impl/meta/reschedule.rs b/src/ctl/src/cmd_impl/meta/reschedule.rs index f14b5c2c30da..64d3e229c911 100644 --- a/src/ctl/src/cmd_impl/meta/reschedule.rs +++ b/src/ctl/src/cmd_impl/meta/reschedule.rs @@ -293,6 +293,10 @@ pub async fn unregister_workers( } if target_worker_ids.is_empty() { + if ignore_not_found { + println!("Warn: No worker provided, ignored"); + return Ok(()); + } println!("No worker provided"); exit(1); }