mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-03 17:31:58 +08:00
add more logs
This commit is contained in:
parent
8862756d11
commit
62b6db567d
@ -695,7 +695,6 @@ DBImpl::MergeFiles(const std::string& table_id, const meta::DateT& date, const m
|
||||
auto file_schema = file;
|
||||
file_schema.file_type_ = meta::TableFileSchema::TO_DELETE;
|
||||
updated.push_back(file_schema);
|
||||
ENGINE_LOG_DEBUG << "Merging file " << file_schema.file_id_;
|
||||
index_size = index->Size();
|
||||
|
||||
if (index_size >= file_schema.index_file_size_) {
|
||||
|
||||
@ -472,6 +472,8 @@ ExecutionEngineImpl::Merge(const std::string& location) {
|
||||
auto status = index_->Add(file_index->Count(), file_index->GetRawVectors(), file_index->GetRawIds());
|
||||
if (!status.ok()) {
|
||||
ENGINE_LOG_ERROR << "Failed to merge: " << location << " to: " << location_;
|
||||
} else {
|
||||
ENGINE_LOG_DEBUG << "Finish merge index file: " << location;
|
||||
}
|
||||
return status;
|
||||
} else {
|
||||
|
||||
@ -17,6 +17,8 @@
|
||||
|
||||
#include "server/grpc_impl/request/CmdRequest.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "utils/Log.h"
|
||||
#include "utils/TimeRecorder.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -35,6 +37,9 @@ CmdRequest::Create(const std::string& cmd, std::string& result) {
|
||||
|
||||
Status
|
||||
CmdRequest::OnExecute() {
|
||||
std::string hdr = "CmdRequest(cmd=" + cmd_ + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
if (cmd_ == "version") {
|
||||
result_ = MILVUS_VERSION;
|
||||
} else if (cmd_ == "tasktable") {
|
||||
|
||||
@ -39,7 +39,8 @@ CountTableRequest::Create(const std::string& table_name, int64_t& row_count) {
|
||||
Status
|
||||
CountTableRequest::OnExecute() {
|
||||
try {
|
||||
TimeRecorder rc("CountTableRequest");
|
||||
std::string hdr = "CountTableRequest(table=" + table_name_ + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
// step 1: check arguments
|
||||
auto status = ValidationUtil::ValidateTableName(table_name_);
|
||||
|
||||
@ -44,7 +44,8 @@ CreateIndexRequest::Create(const ::milvus::grpc::IndexParam* index_param) {
|
||||
Status
|
||||
CreateIndexRequest::OnExecute() {
|
||||
try {
|
||||
TimeRecorder rc("CreateIndexRequest");
|
||||
std::string hdr = "CreateIndexRequest(table=" + index_param_->table_name() + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
// step 1: check arguments
|
||||
std::string table_name_ = index_param_->table_name();
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "utils/ValidationUtil.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace milvus {
|
||||
namespace server {
|
||||
@ -42,7 +43,10 @@ CreatePartitionRequest::Create(const ::milvus::grpc::PartitionParam* partition_p
|
||||
|
||||
Status
|
||||
CreatePartitionRequest::OnExecute() {
|
||||
TimeRecorder rc("CreatePartitionRequest");
|
||||
std::string hdr = "CreatePartitionRequest(table=" + partition_param_->table_name() +
|
||||
", partition_name=" + partition_param_->partition_name() +
|
||||
", partition_tag=" + partition_param_->tag() + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
try {
|
||||
// step 1: check arguments
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "utils/ValidationUtil.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace milvus {
|
||||
namespace server {
|
||||
@ -42,7 +43,9 @@ CreateTableRequest::Create(const ::milvus::grpc::TableSchema* schema) {
|
||||
|
||||
Status
|
||||
CreateTableRequest::OnExecute() {
|
||||
TimeRecorder rc("CreateTableRequest");
|
||||
std::string hdr = "CreateTableRequest(table=" + schema_->table_name() +
|
||||
", dimension=" + std::to_string(schema_->dimension()) + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
try {
|
||||
// step 1: check arguments
|
||||
|
||||
@ -39,7 +39,8 @@ DescribeIndexRequest::Create(const std::string& table_name, ::milvus::grpc::Inde
|
||||
Status
|
||||
DescribeIndexRequest::OnExecute() {
|
||||
try {
|
||||
TimeRecorder rc("DescribeIndexRequest");
|
||||
std::string hdr = "DescribeIndexRequest(table=" + table_name_ + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
// step 1: check arguments
|
||||
auto status = ValidationUtil::ValidateTableName(table_name_);
|
||||
|
||||
@ -38,7 +38,8 @@ DescribeTableRequest::Create(const std::string& table_name, ::milvus::grpc::Tabl
|
||||
|
||||
Status
|
||||
DescribeTableRequest::OnExecute() {
|
||||
TimeRecorder rc("DescribeTableRequest");
|
||||
std::string hdr = "DescribeTableRequest(table=" + table_name_ + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
try {
|
||||
// step 1: check arguments
|
||||
|
||||
@ -39,7 +39,8 @@ DropIndexRequest::Create(const std::string& table_name) {
|
||||
Status
|
||||
DropIndexRequest::OnExecute() {
|
||||
try {
|
||||
TimeRecorder rc("DropIndexRequest");
|
||||
std::string hdr = "DropIndexRequest(table=" + table_name_ + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
// step 1: check arguments
|
||||
auto status = ValidationUtil::ValidateTableName(table_name_);
|
||||
|
||||
@ -39,6 +39,11 @@ DropPartitionRequest::Create(const ::milvus::grpc::PartitionParam* partition_par
|
||||
|
||||
Status
|
||||
DropPartitionRequest::OnExecute() {
|
||||
std::string hdr = "DropPartitionRequest(table=" + partition_param_->table_name() +
|
||||
", partition_name=" + partition_param_->partition_name() +
|
||||
", partition_tag=" + partition_param_->tag() + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
std::string table_name = partition_param_->table_name();
|
||||
std::string partition_name = partition_param_->partition_name();
|
||||
std::string partition_tag = partition_param_->tag();
|
||||
|
||||
@ -40,7 +40,8 @@ DropTableRequest::Create(const std::string& table_name) {
|
||||
Status
|
||||
DropTableRequest::OnExecute() {
|
||||
try {
|
||||
TimeRecorder rc("DropTableRequest");
|
||||
std::string hdr = "DropTableRequest(table=" + table_name_ + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
// step 1: check arguments
|
||||
auto status = ValidationUtil::ValidateTableName(table_name_);
|
||||
|
||||
@ -39,7 +39,8 @@ HasTableRequest::Create(const std::string& table_name, bool& has_table) {
|
||||
Status
|
||||
HasTableRequest::OnExecute() {
|
||||
try {
|
||||
TimeRecorder rc("HasTableRequest");
|
||||
std::string hdr = "HasTableRequest(table=" + table_name_ + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
// step 1: check arguments
|
||||
auto status = ValidationUtil::ValidateTableName(table_name_);
|
||||
|
||||
@ -46,7 +46,8 @@ Status
|
||||
InsertRequest::OnExecute() {
|
||||
try {
|
||||
std::string hdr = "InsertRequest(table=" + insert_param_->table_name() +
|
||||
", n=" + std::to_string(insert_param_->row_record_array_size()) + ")";
|
||||
", n=" + std::to_string(insert_param_->row_record_array_size()) +
|
||||
", partition_tag=" + insert_param_->partition_tag() + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
// step 1: check arguments
|
||||
|
||||
@ -39,7 +39,8 @@ PreloadTableRequest::Create(const std::string& table_name) {
|
||||
Status
|
||||
PreloadTableRequest::OnExecute() {
|
||||
try {
|
||||
TimeRecorder rc("PreloadTableRequest");
|
||||
std::string hdr = "PreloadTableRequest(table=" + table_name_ + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
// step 1: check arguments
|
||||
auto status = ValidationUtil::ValidateTableName(table_name_);
|
||||
|
||||
@ -40,6 +40,9 @@ ShowPartitionsRequest::Create(const std::string& table_name, ::milvus::grpc::Par
|
||||
|
||||
Status
|
||||
ShowPartitionsRequest::OnExecute() {
|
||||
std::string hdr = "ShowPartitionsRequest(table=" + table_name_ + ")";
|
||||
TimeRecorder rc(hdr);
|
||||
|
||||
auto status = ValidationUtil::ValidateTableName(table_name_);
|
||||
if (!status.ok()) {
|
||||
return status;
|
||||
|
||||
@ -38,6 +38,8 @@ ShowTablesRequest::Create(::milvus::grpc::TableNameList* table_name_list) {
|
||||
|
||||
Status
|
||||
ShowTablesRequest::OnExecute() {
|
||||
TimeRecorder rc("ShowTablesRequest");
|
||||
|
||||
std::vector<engine::meta::TableSchema> schema_array;
|
||||
auto statuts = DBWrapper::DB()->AllTables(schema_array);
|
||||
if (!statuts.ok()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user