|
134 | 134 | #include "segcore/storagev2translator/GroupChunkTranslator.h" |
135 | 135 | #include "segcore/storagev2translator/ManifestGroupTranslator.h" |
136 | 136 | #include "segcore/storagev2translator/ManifestGroupTranslatorV2.h" |
| 137 | +#include "segcore/storagev2translator/StorageV2Config.h" |
137 | 138 | #include "segcore/TextColumnCache.h" |
138 | 139 | #include "storage/FileManager.h" |
139 | 140 | #include "storage/KeyRetriever.h" |
@@ -5471,23 +5472,44 @@ ChunkedSegmentSealedImpl::LoadColumnGroup( |
5471 | 5472 | cache_key_suffix = std::to_string(milvus_field_ids.front().get()); |
5472 | 5473 | } |
5473 | 5474 |
|
5474 | | - auto translator = |
5475 | | - std::make_unique<storagev2translator::ManifestGroupTranslatorV2>( |
5476 | | - get_segment_id(), |
5477 | | - GroupChunkType::DEFAULT, |
5478 | | - index, |
5479 | | - std::move(chunk_reader), |
5480 | | - field_metas, |
5481 | | - use_mmap, |
5482 | | - mmap_config.GetMmapPopulate(), |
5483 | | - mmap_dir_path, |
5484 | | - milvus_field_ids.size(), |
5485 | | - load_info->GetPriority(), |
5486 | | - eager_load, |
5487 | | - warmup_policy, |
5488 | | - cache_key_suffix, |
5489 | | - load_info->GetEstimatedBytesPerRow(), |
5490 | | - load_info->GetInsertChannel()); |
| 5475 | + std::unique_ptr<Translator<GroupChunk>> translator; |
| 5476 | + if (storagev2translator::StorageV2AsyncLoadEnabled()) { |
| 5477 | + translator = |
| 5478 | + std::make_unique<storagev2translator::ManifestGroupTranslatorV2>( |
| 5479 | + get_segment_id(), |
| 5480 | + GroupChunkType::DEFAULT, |
| 5481 | + index, |
| 5482 | + std::move(chunk_reader), |
| 5483 | + field_metas, |
| 5484 | + use_mmap, |
| 5485 | + mmap_config.GetMmapPopulate(), |
| 5486 | + mmap_dir_path, |
| 5487 | + milvus_field_ids.size(), |
| 5488 | + load_info->GetPriority(), |
| 5489 | + eager_load, |
| 5490 | + warmup_policy, |
| 5491 | + cache_key_suffix, |
| 5492 | + load_info->GetEstimatedBytesPerRow(), |
| 5493 | + load_info->GetInsertChannel()); |
| 5494 | + } else { |
| 5495 | + translator = |
| 5496 | + std::make_unique<storagev2translator::ManifestGroupTranslator>( |
| 5497 | + get_segment_id(), |
| 5498 | + GroupChunkType::DEFAULT, |
| 5499 | + index, |
| 5500 | + std::move(chunk_reader), |
| 5501 | + field_metas, |
| 5502 | + use_mmap, |
| 5503 | + mmap_config.GetMmapPopulate(), |
| 5504 | + mmap_dir_path, |
| 5505 | + milvus_field_ids.size(), |
| 5506 | + load_info->GetPriority(), |
| 5507 | + eager_load, |
| 5508 | + warmup_policy, |
| 5509 | + cache_key_suffix, |
| 5510 | + load_info->GetEstimatedBytesPerRow(), |
| 5511 | + load_info->GetInsertChannel()); |
| 5512 | + } |
5491 | 5513 | auto chunked_column_group = |
5492 | 5514 | std::make_shared<ChunkedColumnGroup>(std::move(translator)); |
5493 | 5515 |
|
|
0 commit comments