File tree 5 files changed +19
-1
lines changed
5 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,8 @@ impl<Writer: SegmentWriter + Send + Sync + Clone>
174
174
. segment_writer
175
175
. apply_materialized_log_chunk ( res. clone ( ) )
176
176
. instrument ( tracing:: trace_span!(
177
- "Apply materialized logs to record segment"
177
+ "Apply materialized logs" ,
178
+ segment = input. segment_writer. get_name( )
178
179
) )
179
180
. await
180
181
{
Original file line number Diff line number Diff line change @@ -178,6 +178,10 @@ impl DistributedHNSWSegmentWriter {
178
178
}
179
179
180
180
impl SegmentWriter for DistributedHNSWSegmentWriter {
181
+ fn get_name ( & self ) -> & ' static str {
182
+ "DistributedHNSWSegmentWriter"
183
+ }
184
+
181
185
async fn apply_materialized_log_chunk (
182
186
& self ,
183
187
records : chroma_types:: Chunk < super :: MaterializedLogRecord < ' _ > > ,
@@ -241,6 +245,10 @@ impl SegmentWriter for DistributedHNSWSegmentWriter {
241
245
}
242
246
243
247
impl SegmentWriter for Box < DistributedHNSWSegmentWriter > {
248
+ fn get_name ( & self ) -> & ' static str {
249
+ self . as_ref ( ) . get_name ( )
250
+ }
251
+
244
252
async fn apply_materialized_log_chunk (
245
253
& self ,
246
254
records : chroma_types:: Chunk < super :: MaterializedLogRecord < ' _ > > ,
Original file line number Diff line number Diff line change @@ -531,6 +531,10 @@ impl<'me> MetadataSegmentWriter<'me> {
531
531
}
532
532
533
533
impl SegmentWriter for MetadataSegmentWriter < ' _ > {
534
+ fn get_name ( & self ) -> & ' static str {
535
+ "MetadataSegmentWriter"
536
+ }
537
+
534
538
async fn apply_materialized_log_chunk (
535
539
& self ,
536
540
records : Chunk < MaterializedLogRecord < ' _ > > ,
Original file line number Diff line number Diff line change @@ -333,6 +333,10 @@ impl ChromaError for ApplyMaterializedLogError {
333
333
}
334
334
335
335
impl SegmentWriter for RecordSegmentWriter {
336
+ fn get_name ( & self ) -> & ' static str {
337
+ "RecordSegmentWriter"
338
+ }
339
+
336
340
async fn apply_materialized_log_chunk < ' referred_data > (
337
341
& self ,
338
342
records : Chunk < MaterializedLogRecord < ' referred_data > > ,
Original file line number Diff line number Diff line change @@ -789,6 +789,7 @@ impl<'me> LogMaterializer<'me> {
789
789
// This needs to be public for testing
790
790
#[ allow( async_fn_in_trait) ]
791
791
pub trait SegmentWriter {
792
+ fn get_name ( & self ) -> & ' static str ;
792
793
fn apply_materialized_log_chunk (
793
794
& self ,
794
795
records : Chunk < MaterializedLogRecord > ,
You can’t perform that action at this time.
0 commit comments