diff --git a/Cargo.lock b/Cargo.lock index 4edeb10c0..44169624d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1783,7 +1783,7 @@ dependencies = [ [[package]] name = "milli" version = "0.19.0" -source = "git+https://github.com/meilisearch/milli.git?branch=update-error-format#ed6db196810f78632758fc386f8a7f5f6cd6f357" +source = "git+https://github.com/meilisearch/milli.git?branch=update-error-format#9f1e0d2a49447f106277b8a07e0bba65370b47c8" dependencies = [ "bimap", "bincode", diff --git a/meilisearch-http/tests/common/index.rs b/meilisearch-http/tests/common/index.rs index 2e126e67d..cb790ba70 100644 --- a/meilisearch-http/tests/common/index.rs +++ b/meilisearch-http/tests/common/index.rs @@ -99,7 +99,7 @@ impl Index<'_> { pub async fn wait_update_id(&self, update_id: u64) -> Value { // try 10 times to get status, or panic to not wait forever let url = format!("/indexes/{}/updates/{}", self.uid, update_id); - for _ in 0..20 { + for _ in 0..10 { let (response, status_code) = self.service.get(&url).await; assert_eq!(status_code, 200, "response: {}", response); diff --git a/meilisearch-lib/src/index_controller/index_resolver/error.rs b/meilisearch-lib/src/index_controller/index_resolver/error.rs index 7e97b8ce5..9149f801e 100644 --- a/meilisearch-lib/src/index_controller/index_resolver/error.rs +++ b/meilisearch-lib/src/index_controller/index_resolver/error.rs @@ -22,7 +22,7 @@ pub enum IndexResolverError { #[error("Internal Error: `{0}`")] Internal(Box), #[error("Internal Error: Index uuid `{0}` is already assigned.")] - UUIdAlreadyExists(Uuid), + UuidAlreadyExists(Uuid), #[error("{0}")] Milli(#[from] milli::Error), #[error("`{0}` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).")] @@ -60,7 +60,7 @@ impl ErrorCode for IndexResolverError { IndexResolverError::UnexistingIndex(_) => Code::IndexNotFound, IndexResolverError::ExistingPrimaryKey => Code::PrimaryKeyAlreadyPresent, IndexResolverError::Internal(_) => Code::Internal, - IndexResolverError::UUIdAlreadyExists(_) => Code::Internal, + IndexResolverError::UuidAlreadyExists(_) => Code::Internal, IndexResolverError::Milli(e) => MilliError(e).error_code(), IndexResolverError::BadlyFormatted(_) => Code::InvalidIndexUid, } diff --git a/meilisearch-lib/src/index_controller/index_resolver/index_store.rs b/meilisearch-lib/src/index_controller/index_resolver/index_store.rs index 302b23c2f..aa4e68ac8 100644 --- a/meilisearch-lib/src/index_controller/index_resolver/index_store.rs +++ b/meilisearch-lib/src/index_controller/index_resolver/index_store.rs @@ -64,7 +64,7 @@ impl IndexStore for MapIndexStore { } let path = self.path.join(format!("{}", uuid)); if path.exists() { - return Err(IndexResolverError::UUIdAlreadyExists(uuid)); + return Err(IndexResolverError::UuidAlreadyExists(uuid)); } let index_size = self.index_size;