fix: wrong num_entities used when mmap variable length data (#30848) (#31274)

https://github.com/milvus-io/milvus/issues/30728
pr: #30848

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
This commit is contained in:
Jiquan Long 2024-03-14 20:33:03 +08:00 committed by GitHub
parent 4e48a4de0e
commit 50bfde92f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -326,10 +326,10 @@ class VariableColumn : public ColumnBase {
indices_ = std::move(indices);
}
num_rows_ = indices_.size();
// for variable length memory mode only
if (data_ == nullptr) {
num_rows_ = indices_.size();
size_t total_size = size_;
size_ = 0;
Expand(total_size);