mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Use a main read transaction instead of a write one
This commit is contained in:
parent
59f74dabe7
commit
7e86056a27
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ pub async fn update(mut ctx: Context<Data>) -> SResult<Response> {
|
||||||
let index = ctx.index()?;
|
let index = ctx.index()?;
|
||||||
|
|
||||||
let db = &ctx.state().db;
|
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 writer = db.update_write_txn().map_err(ResponseError::internal)?;
|
||||||
|
|
||||||
let mut current_settings = match index.main.customs(&reader).unwrap() {
|
let mut current_settings = match index.main.customs(&reader).unwrap() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue