From 980776b6466e394b74072623adcf28a672f1ac1e Mon Sep 17 00:00:00 2001 From: jiangbo212 Date: Sun, 4 Dec 2022 22:31:23 +0800 Subject: [PATCH] test fail fix --- meilisearch-http/src/routes/indexes/documents.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meilisearch-http/src/routes/indexes/documents.rs b/meilisearch-http/src/routes/indexes/documents.rs index 5788fc815..863b21650 100644 --- a/meilisearch-http/src/routes/indexes/documents.rs +++ b/meilisearch-http/src/routes/indexes/documents.rs @@ -263,6 +263,11 @@ async fn document_addition( }; } + if let Err(e) = buffer.flush().await { + error!("bufWriter flush error: {}", e); + return Err(MeilisearchHttpError::Payload(ReceivePayloadErr)); + }; + if buffer_write_size == 0 { return Err(MeilisearchHttpError::MissingPayload(format)); }