Skip to content

Commit

Permalink
SegmentWriter we can add reader later
Browse files Browse the repository at this point in the history
  • Loading branch information
HammadB committed Mar 13, 2024
1 parent c065181 commit e6248ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/worker/src/segment/types.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::types::EmbeddingRecord;

trait SegmentImpl {
trait SegmentWriter {
fn begin_transaction(&self);
fn write_records(&self, records: Vec<Box<EmbeddingRecord>>, offset_ids: Vec<u32>);
fn commit_transaction(&self);
fn rollback_transaction(&self);
}

trait OffsetIdAssigner: SegmentImpl {
trait OffsetIdAssigner: SegmentWriter {
fn assign_offset_ids(&self, records: Vec<Box<EmbeddingRecord>>) -> Vec<u32>;
}

0 comments on commit e6248ed

Please sign in to comment.