mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 14:54:27 +01:00
add a warning to help us find when we forget to drop explicitely drop a permit
This commit is contained in:
parent
92b151607c
commit
588000d398
@ -49,6 +49,7 @@ impl Permit {
|
|||||||
|
|
||||||
impl Drop for Permit {
|
impl Drop for Permit {
|
||||||
fn drop(&mut self) {
|
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 <https://github.com/meilisearch/meilisearch/issues/new?template=bug_report.md&title=[INTERNAL%20ERROR]%20Meilisearch%20lazily%20dropped%20a%20search%20permit>");
|
||||||
let sender = self.sender.clone();
|
let sender = self.sender.clone();
|
||||||
// if the channel is closed then the whole instance is down
|
// if the channel is closed then the whole instance is down
|
||||||
std::mem::drop(tokio::spawn(async move { sender.send(()).await }));
|
std::mem::drop(tokio::spawn(async move { sender.send(()).await }));
|
||||||
|
Loading…
Reference in New Issue
Block a user