diff --git a/core/src/grpc/README.md b/core/src/grpc/README.md index d3056fc094..4f66d69f7f 100644 --- a/core/src/grpc/README.md +++ b/core/src/grpc/README.md @@ -1,4 +1,4 @@ We manually add two APIs in "milvus.pd.h": -add_vector_data -add_row_id_array + add_vector_data() + add_row_id_array() If proto files need be generated again, remember to re-add above APIs. \ No newline at end of file diff --git a/core/src/sdk/grpc/ClientProxy.cpp b/core/src/sdk/grpc/ClientProxy.cpp index 04878acf7f..bc572ed0a2 100644 --- a/core/src/sdk/grpc/ClientProxy.cpp +++ b/core/src/sdk/grpc/ClientProxy.cpp @@ -188,14 +188,13 @@ ClientProxy::Insert(const std::string& table_name, const std::vector& for (auto& record : record_array) { ::milvus::grpc::RowRecord* grpc_record = insert_param.add_row_record_array(); - for (size_t i = 0; i < record.data.size(); i++) { - grpc_record->add_vector_data(record.data.begin(), record.data.end()); - } + grpc_record->add_vector_data(record.data.begin(), record.data.end()); } // Single thread ::milvus::grpc::VectorIds vector_ids; if (!id_array.empty()) { + /* set user's ids */ insert_param.add_row_id_array(id_array.begin(), id_array.end()); client_ptr_->Insert(vector_ids, insert_param, status); } else {