Skip to content

Commit f1d756b

Browse files
authored
Improve logging and errors verbosity (#10768)
1 parent cf5cb23 commit f1d756b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

ydb/core/kqp/compute_actor/kqp_compute_actor_factory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ struct TMemoryQuotaManager : public NYql::NDq::TGuaranteeQuotaManager {
5959
}
6060

6161
TString MemoryConsumptionDetails() const override {
62-
return Tx->ToString();
62+
// NOTE: don't forget to disable verbosity in stable branches.
63+
return Tx->ToString(true);
6364
}
6465

6566
void TerminateHandler(bool success, const NYql::TIssues& issues) {

ydb/core/kqp/executer_actor/kqp_executer_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ class TKqpExecuterBase : public TActorBootstrapped<TDerived> {
19181918
if (Stats->CollectStatsByLongTasks) {
19191919
const auto& txPlansWithStats = response.GetResult().GetStats().GetTxPlansWithStats();
19201920
if (!txPlansWithStats.empty()) {
1921-
LOG_N("Full stats: " << response.GetResult().GetStats());
1921+
LOG_I("Full stats: " << response.GetResult().GetStats());
19221922
}
19231923
}
19241924
}

ydb/core/kqp/rm_service/kqp_rm_service.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class TTxState : public TAtomicRefCount<TTxState> {
150150
return std::make_pair(Database, PoolId);
151151
}
152152

153-
TString ToString() const {
153+
TString ToString(bool verbose = false) const {
154154
auto res = TStringBuilder() << "TxResourcesInfo { "
155155
<< "TxId: " << TxId
156156
<< ", Database: " << Database;
@@ -168,10 +168,10 @@ class TTxState : public TAtomicRefCount<TTxState> {
168168
<< ", started at: " << CreatedAt
169169
<< " }" << Endl;
170170

171-
if (TxMaxAllocationBacktrace.load()) {
171+
if (verbose && TxMaxAllocationBacktrace.load()) {
172172
res << "TxMaxAllocationBacktrace:" << Endl << TxMaxAllocationBacktrace.load()->PrintToString();
173173
}
174-
if (TxFailedAllocationBacktrace.load()) {
174+
if (verbose && TxFailedAllocationBacktrace.load()) {
175175
res << "TxFailedAllocationBacktrace:" << Endl << TxFailedAllocationBacktrace.load()->PrintToString();
176176
}
177177

0 commit comments

Comments
 (0)