From 441417447e1e882a8d093485993d0ab051aecc59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Thu, 13 Oct 2022 13:04:49 +0200 Subject: [PATCH] Avoid creating two read txn at the same time --- index-scheduler/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 0bfec9eed..07d896d7b 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -293,8 +293,8 @@ impl IndexScheduler { /// Returns the tasks corresponding to the query. pub fn get_tasks(&self, query: Query) -> Result> { - let rtxn = self.env.read_txn()?; let tasks = self.get_task_ids(&query)?; + let rtxn = self.env.read_txn()?; let tasks = self.get_existing_tasks( &rtxn,