mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
fix: fixup data race at generate binlog index (#29370)
issue: #29339 Signed-off-by: chyezh <ye.zhen@zilliz.com>
This commit is contained in:
parent
48f506b077
commit
be87c18b44
@ -1455,7 +1455,13 @@ SegmentSealedImpl::generate_binlog_index(const FieldId field_id) {
|
||||
// get binlog data and meta
|
||||
auto row_count = num_rows_.value();
|
||||
auto dim = field_meta.get_dim();
|
||||
auto vec_data = fields_.at(field_id);
|
||||
std::shared_ptr<ColumnBase> vec_data{};
|
||||
{
|
||||
// field should be exists.
|
||||
// otherwise, out_of_range exception is thrown by fields_.at
|
||||
std::shared_lock lck(mutex_);
|
||||
vec_data = fields_.at(field_id);
|
||||
}
|
||||
auto dataset =
|
||||
knowhere::GenDataSet(row_count, dim, (void*)vec_data->Data());
|
||||
dataset->SetIsOwner(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user