From 50bfde92f2922a8a807dfee195acc65272a68e3a Mon Sep 17 00:00:00 2001 From: Jiquan Long Date: Thu, 14 Mar 2024 20:33:03 +0800 Subject: [PATCH] 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 --- internal/core/src/mmap/Column.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/core/src/mmap/Column.h b/internal/core/src/mmap/Column.h index 8eae2a80db82..be7281ba0c78 100644 --- a/internal/core/src/mmap/Column.h +++ b/internal/core/src/mmap/Column.h @@ -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);