mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-19 17:38:28 +08:00
Rename recv and read methods to recv_action and recv_frame
This commit is contained in:
parent
5b860cb989
commit
30eb0e5b5b
@ -136,11 +136,11 @@ impl LargeVectors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> WriterBbqueueReceiver<'a> {
|
impl<'a> WriterBbqueueReceiver<'a> {
|
||||||
pub fn recv(&mut self) -> Option<ReceiverAction> {
|
pub fn recv_action(&mut self) -> Option<ReceiverAction> {
|
||||||
self.receiver.recv().ok()
|
self.receiver.recv().ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn read(&mut self) -> Option<FrameWithHeader<'a>> {
|
pub fn recv_frame(&mut self) -> Option<FrameWithHeader<'a>> {
|
||||||
for consumer in &mut self.consumers {
|
for consumer in &mut self.consumers {
|
||||||
if let Some(frame) = consumer.read() {
|
if let Some(frame) = consumer.read() {
|
||||||
return Some(FrameWithHeader::from(frame));
|
return Some(FrameWithHeader::from(frame));
|
||||||
|
@ -417,7 +417,7 @@ where
|
|||||||
let span = tracing::trace_span!(target: "indexing::write_db", "post_merge");
|
let span = tracing::trace_span!(target: "indexing::write_db", "post_merge");
|
||||||
let mut _entered_post_merge = None;
|
let mut _entered_post_merge = None;
|
||||||
|
|
||||||
while let Some(action) = writer_receiver.recv() {
|
while let Some(action) = writer_receiver.recv_action() {
|
||||||
if _entered_post_merge.is_none()
|
if _entered_post_merge.is_none()
|
||||||
&& finished_extraction.load(std::sync::atomic::Ordering::Relaxed)
|
&& finished_extraction.load(std::sync::atomic::Ordering::Relaxed)
|
||||||
{
|
{
|
||||||
@ -556,7 +556,7 @@ fn write_from_bbqueue(
|
|||||||
arroy_writers: &HashMap<u8, (&str, &crate::vector::Embedder, ArroyWrapper, usize)>,
|
arroy_writers: &HashMap<u8, (&str, &crate::vector::Embedder, ArroyWrapper, usize)>,
|
||||||
aligned_embedding: &mut Vec<f32>,
|
aligned_embedding: &mut Vec<f32>,
|
||||||
) -> crate::Result<()> {
|
) -> crate::Result<()> {
|
||||||
while let Some(frame_with_header) = writer_receiver.read() {
|
while let Some(frame_with_header) = writer_receiver.recv_frame() {
|
||||||
match frame_with_header.header() {
|
match frame_with_header.header() {
|
||||||
EntryHeader::DbOperation(operation) => {
|
EntryHeader::DbOperation(operation) => {
|
||||||
let database_name = operation.database.database_name();
|
let database_name = operation.database.database_name();
|
||||||
|
Loading…
Reference in New Issue
Block a user