From 4407359b7381415e91d925c0ea492ab4a4872888 Mon Sep 17 00:00:00 2001 From: Adrien Guillo Date: Thu, 15 Feb 2024 17:42:54 -0500 Subject: [PATCH] List queues from mrecordlog rather than metadata --- quickwit/quickwit-ingest/src/ingest_v2/ingester.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/quickwit/quickwit-ingest/src/ingest_v2/ingester.rs b/quickwit/quickwit-ingest/src/ingest_v2/ingester.rs index 8579e937d9c..2783f8a2f1f 100644 --- a/quickwit/quickwit-ingest/src/ingest_v2/ingester.rs +++ b/quickwit/quickwit-ingest/src/ingest_v2/ingester.rs @@ -258,11 +258,10 @@ impl Ingester { let mut per_source_shard_ids: HashMap<(IndexUid, SourceId), Vec> = HashMap::new(); - let state_guard = - with_lock_metrics!(self.state.lock_partially().await, "reset_shards", "read") - .expect("ingester should be ready"); + let state_guard = with_lock_metrics!(self.state.lock_fully().await, "reset_shards", "read") + .expect("ingester should be ready"); - for queue_id in state_guard.shards.keys() { + for queue_id in state_guard.mrecordlog.list_queues() { let Some((index_uid, source_id, shard_id)) = split_queue_id(queue_id) else { warn!("failed to parse queue ID `{queue_id}`"); continue;