diff --git a/internal/core/src/query/SearchOnSealed.cpp b/internal/core/src/query/SearchOnSealed.cpp index db524c6a98f36..cb1c437edb551 100644 --- a/internal/core/src/query/SearchOnSealed.cpp +++ b/internal/core/src/query/SearchOnSealed.cpp @@ -42,7 +42,8 @@ SearchOnSealedIndex(const Schema& schema, // Keep the field_indexing smart pointer, until all reference by raw dropped. auto field_indexing = record.get_field_indexing(field_id); AssertInfo(field_indexing->metric_type_ == search_info.metric_type_, - "Metric type of field index isn't the same with search info"); + "Metric type of field index isn't the same with search info," + "field index: {}, search info: {}", field_indexing->metric_type_, search_info.metric_type_); auto dataset = knowhere::GenDataSet(num_queries, dim, query_data); dataset->SetIsSparse(is_sparse); diff --git a/internal/core/src/segcore/ConcurrentVector.h b/internal/core/src/segcore/ConcurrentVector.h index 740c88d0ac82b..52971063ad02e 100644 --- a/internal/core/src/segcore/ConcurrentVector.h +++ b/internal/core/src/segcore/ConcurrentVector.h @@ -71,7 +71,7 @@ class ThreadSafeVector { int64_t size() const { - std::lock_guard lck(mutex_); + std::shared_lock lck(mutex_); return size_; } diff --git a/internal/datanode/compaction/priority_queue_test.go b/internal/datanode/compaction/priority_queue_test.go index 954ad095c376d..d3a73ec062bb4 100644 --- a/internal/datanode/compaction/priority_queue_test.go +++ b/internal/datanode/compaction/priority_queue_test.go @@ -4,8 +4,9 @@ import ( "container/heap" "testing" - "github.com/milvus-io/milvus/internal/storage" "github.com/stretchr/testify/suite" + + "github.com/milvus-io/milvus/internal/storage" ) type PriorityQueueSuite struct { diff --git a/internal/datanode/compaction/segment_writer.go b/internal/datanode/compaction/segment_writer.go index 37d193ee04706..00cf7317a2458 100644 --- a/internal/datanode/compaction/segment_writer.go +++ b/internal/datanode/compaction/segment_writer.go @@ -8,6 +8,7 @@ import ( "context" "math" + "github.com/samber/lo" "go.uber.org/atomic" "go.uber.org/zap" @@ -21,7 +22,6 @@ import ( "github.com/milvus-io/milvus/pkg/log" "github.com/milvus-io/milvus/pkg/util/paramtable" "github.com/milvus-io/milvus/pkg/util/typeutil" - "github.com/samber/lo" ) // Not concurrent safe.