mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: Inserting null and non-null array at the same time will cause milvus crash when growing mmap open (#41051)
issue: https://github.com/milvus-io/milvus/issues/40981 2.5 pr: https://github.com/milvus-io/milvus/pull/41052 Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
This commit is contained in:
parent
7cec96f892
commit
5219d9a723
@ -214,9 +214,7 @@ VariableLengthChunk<Array>::set(
|
||||
size_t total_size = 0;
|
||||
for (auto i = 0; i < length; i++) {
|
||||
total_size += src[i].byte_size();
|
||||
}
|
||||
if (length > 0 && IsVariableDataType(src[0].get_element_type())) {
|
||||
for (auto i = 0; i < length; i++) {
|
||||
if (IsVariableDataType(src[i].get_element_type())) {
|
||||
total_size += (src[i].length() * sizeof(uint32_t));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user