Rename recv and read methods to recv_action and recv_frame

This commit is contained in:
Clément Renault 2024-12-02 10:08:01 +01:00
parent 5b860cb989
commit 30eb0e5b5b
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
2 changed files with 4 additions and 4 deletions

View File

@ -136,11 +136,11 @@ impl LargeVectors {
}
impl<'a> WriterBbqueueReceiver<'a> {
pub fn recv(&mut self) -> Option<ReceiverAction> {
pub fn recv_action(&mut self) -> Option<ReceiverAction> {
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 {
if let Some(frame) = consumer.read() {
return Some(FrameWithHeader::from(frame));

View File

@ -417,7 +417,7 @@ where
let span = tracing::trace_span!(target: "indexing::write_db", "post_merge");
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()
&& 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)>,
aligned_embedding: &mut Vec<f32>,
) -> 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() {
EntryHeader::DbOperation(operation) => {
let database_name = operation.database.database_name();