12
12
#include < ydb/core/tablet_flat/flat_cxx_database.h>
13
13
#include < ydb/core/tablet_flat/tablet_flat_executor.h>
14
14
15
+ #include < ydb/library/protobuf_printer/security_printer.h>
16
+
15
17
#include < util/generic/algorithm.h>
16
18
17
19
namespace NKikimr ::NSchemeShard {
@@ -85,6 +87,14 @@ NKikimrScheme::TEvModifySchemeTransaction GetRecordForPrint(const NKikimrScheme:
85
87
return recordForPrint;
86
88
}
87
89
90
+ TString PrintSecurely (const NKikimrScheme::TEvModifySchemeTransaction& record) {
91
+ TSecurityTextFormatPrinter<NKikimrScheme::TEvModifySchemeTransaction> printer;
92
+ printer.SetSingleLineMode (true );
93
+ TString string;
94
+ printer.PrintToString (record, &string);
95
+ return string;
96
+ }
97
+
88
98
THolder<TProposeResponse> TSchemeShard::IgniteOperation (TProposeRequest& request, TOperationContext& context) {
89
99
THolder<TProposeResponse> response = nullptr ;
90
100
@@ -183,7 +193,7 @@ THolder<TProposeResponse> TSchemeShard::IgniteOperation(TProposeRequest& request
183
193
<< " , already accepted parts: " << operation->Parts .size ()
184
194
<< " , propose result status: " << NKikimrScheme::EStatus_Name (response->Record .GetStatus ())
185
195
<< " , with reason: " << response->Record .GetReason ()
186
- << " , tx message: " << GetRecordForPrint (record). ShortDebugString ( ));
196
+ << " , tx message: " << PrintSecurely (record));
187
197
}
188
198
189
199
Y_VERIFY_S (context.IsUndoChangesSafe (),
@@ -194,7 +204,7 @@ THolder<TProposeResponse> TSchemeShard::IgniteOperation(TProposeRequest& request
194
204
<< " , already accepted parts: " << operation->Parts .size ()
195
205
<< " , propose result status: " << NKikimrScheme::EStatus_Name (response->Record .GetStatus ())
196
206
<< " , with reason: " << response->Record .GetReason ()
197
- << " , tx message: " << GetRecordForPrint (record). ShortDebugString ( ));
207
+ << " , tx message: " << PrintSecurely (record));
198
208
199
209
context.OnComplete = {}; // recreate
200
210
context.DbChanges = {};
@@ -237,7 +247,7 @@ struct TSchemeShard::TTxOperationPropose: public NTabletFlatExecutor::TTransacti
237
247
238
248
LOG_DEBUG_S (ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
239
249
" TTxOperationPropose Execute"
240
- << " , message: " << GetRecordForPrint (Request->Get ()->Record ). ShortDebugString ( )
250
+ << " , message: " << PrintSecurely (Request->Get ()->Record )
241
251
<< " , at schemeshard: " << selfId);
242
252
243
253
txc.DB .NoMoreReadsForTx ();
0 commit comments