From 41596951db91584ca9943d81009283ac08bc6247 Mon Sep 17 00:00:00 2001 From: Huang Wei Date: Thu, 24 Aug 2023 19:11:00 +0800 Subject: [PATCH] debug msg --- src/cmd/sql_cmd_test.cc | 3 ++- src/tablet/tablet_impl.cc | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cmd/sql_cmd_test.cc b/src/cmd/sql_cmd_test.cc index cced755f2b7..3e97587f690 100644 --- a/src/cmd/sql_cmd_test.cc +++ b/src/cmd/sql_cmd_test.cc @@ -3005,7 +3005,8 @@ TEST_P(DBSDKTest, LongWindowsCleanup) { // sp_cache_->ProcedureExist in tablet get deployment here, but nameserver no deployment // refresh won't effet sp_cache_ in tablet sr->ExecuteSQL(deploy_sql, &status); - ASSERT_TRUE(status.IsOK()) << status.ToString(); + // may get error `Fail to transform data_provider op: table test2.trans not exist!` TODO + ASSERT_TRUE(status.IsOK()) << "deploy failed on " << status.ToString(); std::string msg; std::string result_sql = "select * from __INTERNAL_DB.PRE_AGG_META_INFO;"; auto rs = sr->ExecuteSQL("", result_sql, &status); diff --git a/src/tablet/tablet_impl.cc b/src/tablet/tablet_impl.cc index 850cfd97a31..bcdedc393b1 100644 --- a/src/tablet/tablet_impl.cc +++ b/src/tablet/tablet_impl.cc @@ -558,7 +558,7 @@ void TabletImpl::Refresh(RpcController* controller, const ::openmldb::api::Refre PDLOG(INFO, "refresh success. tid %u", request->tid()); } } else { - LOG(INFO) << "refresh table info by RefreshRequest without tid"; + LOG(INFO) << "refresh all by rpc without tid"; RefreshTableInfo(); } } @@ -5224,11 +5224,11 @@ void TabletImpl::CreateProcedure(RpcController* controller, const openmldb::api: const std::string& db_name = sp_info.db_name(); const std::string& sp_name = sp_info.sp_name(); const std::string& sql = sp_info.sql(); - LOG(INFO) << "create procedure rpc in " << endpoint_; // no get size func << " with sp cache " << sp_cache_-> if (sp_cache_->ProcedureExist(db_name, sp_name)) { response->set_code(::openmldb::base::ReturnCode::kProcedureAlreadyExists); response->set_msg("store procedure already exists"); - PDLOG(WARNING, "store procedure[%s] already exists in db[%s]", sp_name.c_str(), db_name.c_str()); + // print endpoint for ut debug + PDLOG(WARNING, "store procedure[%s] already exists in db[%s] on %s", sp_name.c_str(), db_name.c_str(), endpoint_.c_str()); return; } ::hybridse::base::Status status; @@ -5317,8 +5317,7 @@ void TabletImpl::DropProcedure(RpcController* controller, const ::openmldb::api: } response->set_code(::openmldb::base::ReturnCode::kOk); response->set_msg("ok"); - LOG(INFO) << "drop succ in " << endpoint_; - PDLOG(INFO, "drop procedure success. db_name[%s] sp_name[%s]", db_name.c_str(), sp_name.c_str()); + PDLOG(INFO, "drop procedure success. db_name[%s] sp_name[%s] on %s", db_name.c_str(), sp_name.c_str(), endpoint_.c_str()); } void TabletImpl::RunRequestQuery(RpcController* ctrl, const openmldb::api::QueryRequest& request, @@ -5402,7 +5401,7 @@ void TabletImpl::CreateProcedure(const std::shared_ptrInsertSQLProcedureCacheEntry(db_name, sp_name, sp_info, session.GetCompileInfo(), batch_session.GetCompileInfo()); - + // only called by RefreshTableInfo LOG(INFO) << "refresh procedure success! sp_name: " << sp_name << ", db: " << db_name << ", sql: " << sql; }