mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 12:35:05 +08:00
Merge #334
334: Wrap long values into BStr for warn logs r=Kerollmops a=shekhirin Resolves https://github.com/meilisearch/milli/issues/263 Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
This commit is contained in:
commit
d6bba0663a
@ -477,7 +477,7 @@ impl<'s, A: AsRef<[u8]>> Store<'s, A> {
|
|||||||
if lmdb_key_valid_size(&key) {
|
if lmdb_key_valid_size(&key) {
|
||||||
writer.insert(&key, &buffer)?;
|
writer.insert(&key, &buffer)?;
|
||||||
} else {
|
} else {
|
||||||
warn!("word {:?} is too large to be saved", word);
|
warn!("word {:?} is too large to be saved", word.as_bytes().as_bstr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -515,7 +515,7 @@ impl<'s, A: AsRef<[u8]>> Store<'s, A> {
|
|||||||
if lmdb_key_valid_size(&key_buffer) {
|
if lmdb_key_valid_size(&key_buffer) {
|
||||||
writer.insert(&key_buffer, &data_buffer)?;
|
writer.insert(&key_buffer, &data_buffer)?;
|
||||||
} else {
|
} else {
|
||||||
warn!("word {:?} is too large to be saved", word);
|
warn!("word {:?} is too large to be saved", word.as_bytes().as_bstr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -542,7 +542,10 @@ impl<'s, A: AsRef<[u8]>> Store<'s, A> {
|
|||||||
if lmdb_key_valid_size(&key_buffer) {
|
if lmdb_key_valid_size(&key_buffer) {
|
||||||
sorter.insert(&key_buffer, &data)?;
|
sorter.insert(&key_buffer, &data)?;
|
||||||
} else {
|
} else {
|
||||||
warn!("facet value {:?} is too large to be saved", original_value);
|
warn!(
|
||||||
|
"facet value {:?} is too large to be saved",
|
||||||
|
original_value.as_bytes().as_bstr()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,7 +617,7 @@ impl<'s, A: AsRef<[u8]>> Store<'s, A> {
|
|||||||
if lmdb_key_valid_size(&buffer) {
|
if lmdb_key_valid_size(&buffer) {
|
||||||
sorter.insert(&buffer, original_value.as_bytes())?;
|
sorter.insert(&buffer, original_value.as_bytes())?;
|
||||||
} else {
|
} else {
|
||||||
warn!("facet value {:?} is too large to be saved", original_value);
|
warn!("facet value {:?} is too large to be saved", original_value.as_bytes().as_bstr());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -640,7 +643,7 @@ impl<'s, A: AsRef<[u8]>> Store<'s, A> {
|
|||||||
if lmdb_key_valid_size(&key) {
|
if lmdb_key_valid_size(&key) {
|
||||||
sorter.insert(&key, &buffer)?;
|
sorter.insert(&key, &buffer)?;
|
||||||
} else {
|
} else {
|
||||||
warn!("word {:?} is too large to be saved", word);
|
warn!("word {:?} is too large to be saved", word.as_bytes().as_bstr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user