Skip to content

Commit

Permalink
Remove outter timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed May 13, 2024
1 parent 727863c commit 23452de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions quickwit/quickwit-serve/src/elasticsearch_api/bulk_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::collections::HashMap;
use std::time::{Duration, Instant};
use std::time::Instant;

use hyper::StatusCode;
use quickwit_config::INGEST_V2_SOURCE_ID;
Expand Down Expand Up @@ -130,9 +130,7 @@ pub(crate) async fn elastic_bulk_ingest_v2(
let Some(ingest_request) = ingest_request_opt else {
return Ok(ElasticBulkResponse::default());
};
let ingest_response_v2 =
tokio::time::timeout(Duration::from_millis(500), ingest_router.ingest(ingest_request)).await
.map_err(|err| ElasticsearchError::new(StatusCode::REQUEST_TIMEOUT, "router timeout".to_string(), None))??;
let ingest_response_v2 = ingest_router.ingest(ingest_request).await?;
let errors = !ingest_response_v2.failures.is_empty();
let mut items = Vec::new();

Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-serve/src/rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub(crate) async fn start_rest_server(

let service = ServiceBuilder::new()
.concurrency_limit(quickwit_common::get_from_env("QW_REST_CONCURRENCY_LIMIT", 5))
.timeout(Duration::from_secs(1))
// .timeout(Duration::from_secs(1))
.layer(
CompressionLayer::new()
.gzip(true)
Expand Down

0 comments on commit 23452de

Please sign in to comment.