From 241746e7f4056ae075eaf0424b2be8900f81a341 Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 28 Aug 2024 14:37:55 +0200 Subject: [PATCH] add a warning to help us find when we forget to drop explicitely drop a permit --- meilisearch/src/search_queue.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/meilisearch/src/search_queue.rs b/meilisearch/src/search_queue.rs index 71833dd24..44a66ff82 100644 --- a/meilisearch/src/search_queue.rs +++ b/meilisearch/src/search_queue.rs @@ -49,6 +49,7 @@ impl Permit { impl Drop for Permit { fn drop(&mut self) { + tracing::warn!("Internal error, a search permit was lazily dropped. If you see this message, please open an issue on the meilisearch repository at "); let sender = self.sender.clone(); // if the channel is closed then the whole instance is down std::mem::drop(tokio::spawn(async move { sender.send(()).await }));