Skip to content

Commit

Permalink
debug msg
Browse files Browse the repository at this point in the history
  • Loading branch information
vagetablechicken committed Aug 24, 2023
1 parent 20460e2 commit 4159695
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/cmd/sql_cmd_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
11 changes: 5 additions & 6 deletions src/tablet/tablet_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Check warning on line 562 in src/tablet/tablet_impl.cc

View check run for this annotation

Codecov / codecov/patch

src/tablet/tablet_impl.cc#L561-L562

Added lines #L561 - L562 were not covered by tests
}
}
Expand Down Expand Up @@ -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());

Check warning on line 5231 in src/tablet/tablet_impl.cc

View check run for this annotation

Codecov / codecov/patch

src/tablet/tablet_impl.cc#L5231

Added line #L5231 was not covered by tests
return;
}
::hybridse::base::Status status;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -5402,7 +5401,7 @@ void TabletImpl::CreateProcedure(const std::shared_ptr<hybridse::sdk::ProcedureI
}
sp_cache_->InsertSQLProcedureCacheEntry(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;
}

Expand Down

0 comments on commit 4159695

Please sign in to comment.