mirror of https://github.com/milvus-io/milvus.git
enhance: fix the incorrect init parameter (#29357)
as the `driver_` field is not used so this doesn't matter for now Signed-off-by: yah01 <yang.cen@zilliz.com>pull/29370/head
parent
46a937ac43
commit
04b2518ae7
|
@ -218,7 +218,7 @@ class FieldMeta {
|
||||||
: name_(name),
|
: name_(name),
|
||||||
id_(id),
|
id_(id),
|
||||||
type_(type),
|
type_(type),
|
||||||
vector_info_(VectorInfo{dim, metric_type}) {
|
vector_info_(VectorInfo{dim, std::move(metric_type)}) {
|
||||||
Assert(datatype_is_vector(type_));
|
Assert(datatype_is_vector(type_));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ class BlockingState {
|
||||||
ContinueFuture&& future,
|
ContinueFuture&& future,
|
||||||
Operator* op,
|
Operator* op,
|
||||||
BlockingReason reason)
|
BlockingReason reason)
|
||||||
: driver_(std::move(driver_)),
|
: driver_(std::move(driver)),
|
||||||
future_(std::move(future)),
|
future_(std::move(future)),
|
||||||
operator_(op),
|
operator_(op),
|
||||||
reason_(reason) {
|
reason_(reason) {
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
#include <boost/uuid/uuid_generators.hpp>
|
#include <boost/uuid/uuid_generators.hpp>
|
||||||
#include <boost/uuid/uuid_io.hpp>
|
#include <boost/uuid/uuid_io.hpp>
|
||||||
|
#include "log/Log.h"
|
||||||
|
|
||||||
namespace milvus {
|
namespace milvus {
|
||||||
namespace exec {
|
namespace exec {
|
||||||
|
@ -139,6 +140,7 @@ Task::Next(ContinueFuture* future) {
|
||||||
"Task has already finished processing.");
|
"Task has already finished processing.");
|
||||||
|
|
||||||
if (driver_factories_.empty()) {
|
if (driver_factories_.empty()) {
|
||||||
|
LOG_SEGCORE_WARNING_ << "create driver...";
|
||||||
AssertInfo(
|
AssertInfo(
|
||||||
consumer_supplier_ == nullptr,
|
consumer_supplier_ == nullptr,
|
||||||
"Single-threaded execution doesn't support delivering results to a "
|
"Single-threaded execution doesn't support delivering results to a "
|
||||||
|
@ -163,6 +165,7 @@ Task::Next(ContinueFuture* future) {
|
||||||
CreateDriversLocked(self, kUngroupedGroupId, drivers);
|
CreateDriversLocked(self, kUngroupedGroupId, drivers);
|
||||||
|
|
||||||
drivers_ = std::move(drivers);
|
drivers_ = std::move(drivers);
|
||||||
|
LOG_SEGCORE_WARNING_ << "create driver done";
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto num_drivers = drivers_.size();
|
const auto num_drivers = drivers_.size();
|
||||||
|
@ -188,7 +191,9 @@ Task::Next(ContinueFuture* future) {
|
||||||
|
|
||||||
std::shared_ptr<BlockingState> blocking_state;
|
std::shared_ptr<BlockingState> blocking_state;
|
||||||
|
|
||||||
|
LOG_SEGCORE_WARNING_ << "driver fetch next result...";
|
||||||
auto result = drivers_[i]->Next(blocking_state);
|
auto result = drivers_[i]->Next(blocking_state);
|
||||||
|
LOG_SEGCORE_WARNING_ << "driver fetch next result done";
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -82,7 +82,7 @@ ScalarIndexSort<T>::BuildV2(const Config& config) {
|
||||||
field_datas.push_back(field_data);
|
field_datas.push_back(field_data);
|
||||||
}
|
}
|
||||||
int64_t total_num_rows = 0;
|
int64_t total_num_rows = 0;
|
||||||
for (auto data : field_datas) {
|
for (const auto& data : field_datas) {
|
||||||
total_num_rows += data->get_num_rows();
|
total_num_rows += data->get_num_rows();
|
||||||
}
|
}
|
||||||
if (total_num_rows == 0) {
|
if (total_num_rows == 0) {
|
||||||
|
@ -92,7 +92,7 @@ ScalarIndexSort<T>::BuildV2(const Config& config) {
|
||||||
|
|
||||||
data_.reserve(total_num_rows);
|
data_.reserve(total_num_rows);
|
||||||
int64_t offset = 0;
|
int64_t offset = 0;
|
||||||
for (auto data : field_datas) {
|
for (const auto& data : field_datas) {
|
||||||
auto slice_num = data->get_num_rows();
|
auto slice_num = data->get_num_rows();
|
||||||
for (size_t i = 0; i < slice_num; ++i) {
|
for (size_t i = 0; i < slice_num; ++i) {
|
||||||
auto value = reinterpret_cast<const T*>(data->RawValue(i));
|
auto value = reinterpret_cast<const T*>(data->RawValue(i));
|
||||||
|
@ -122,7 +122,7 @@ ScalarIndexSort<T>::Build(const Config& config) {
|
||||||
file_manager_->CacheRawDataToMemory(insert_files.value());
|
file_manager_->CacheRawDataToMemory(insert_files.value());
|
||||||
|
|
||||||
int64_t total_num_rows = 0;
|
int64_t total_num_rows = 0;
|
||||||
for (auto data : field_datas) {
|
for (const auto& data : field_datas) {
|
||||||
total_num_rows += data->get_num_rows();
|
total_num_rows += data->get_num_rows();
|
||||||
}
|
}
|
||||||
if (total_num_rows == 0) {
|
if (total_num_rows == 0) {
|
||||||
|
@ -132,7 +132,7 @@ ScalarIndexSort<T>::Build(const Config& config) {
|
||||||
|
|
||||||
data_.reserve(total_num_rows);
|
data_.reserve(total_num_rows);
|
||||||
int64_t offset = 0;
|
int64_t offset = 0;
|
||||||
for (auto data : field_datas) {
|
for (const auto& data : field_datas) {
|
||||||
auto slice_num = data->get_num_rows();
|
auto slice_num = data->get_num_rows();
|
||||||
for (size_t i = 0; i < slice_num; ++i) {
|
for (size_t i = 0; i < slice_num; ++i) {
|
||||||
auto value = reinterpret_cast<const T*>(data->RawValue(i));
|
auto value = reinterpret_cast<const T*>(data->RawValue(i));
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace milvus {
|
||||||
inline size_t
|
inline size_t
|
||||||
GetDataSize(const std::vector<FieldDataPtr>& datas) {
|
GetDataSize(const std::vector<FieldDataPtr>& datas) {
|
||||||
size_t total_size{0};
|
size_t total_size{0};
|
||||||
for (auto data : datas) {
|
for (const auto& data : datas) {
|
||||||
total_size += data->Size();
|
total_size += data->Size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ GetDataSize(const std::vector<FieldDataPtr>& datas) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void*
|
inline void*
|
||||||
FillField(DataType data_type, const FieldDataPtr data, void* dst) {
|
FillField(DataType data_type, const FieldDataPtr& data, void* dst) {
|
||||||
char* dest = reinterpret_cast<char*>(dst);
|
char* dest = reinterpret_cast<char*>(dst);
|
||||||
if (datatype_is_variable(data_type)) {
|
if (datatype_is_variable(data_type)) {
|
||||||
switch (data_type) {
|
switch (data_type) {
|
||||||
|
|
Loading…
Reference in New Issue