From 7e86056a270335814abc175cb06c9ef11c7930d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 17 Dec 2019 15:48:06 +0100 Subject: [PATCH] Use a main read transaction instead of a write one --- meilisearch-http/src/routes/setting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch-http/src/routes/setting.rs b/meilisearch-http/src/routes/setting.rs index 8415aedeb..796c55f97 100644 --- a/meilisearch-http/src/routes/setting.rs +++ b/meilisearch-http/src/routes/setting.rs @@ -72,7 +72,7 @@ pub async fn update(mut ctx: Context) -> SResult { let index = ctx.index()?; let db = &ctx.state().db; - let reader = db.main_write_txn().map_err(ResponseError::internal)?; + let reader = db.main_read_txn().map_err(ResponseError::internal)?; let mut writer = db.update_write_txn().map_err(ResponseError::internal)?; let mut current_settings = match index.main.customs(&reader).unwrap() {