mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
Fix PR comments
This commit is contained in:
parent
59636fa688
commit
cbaca2b579
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -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",
|
||||
|
@ -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);
|
||||
|
||||
|
@ -22,7 +22,7 @@ pub enum IndexResolverError {
|
||||
#[error("Internal Error: `{0}`")]
|
||||
Internal(Box<dyn std::error::Error + Send + Sync + 'static>),
|
||||
#[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,
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user