1
- #include < util/datetime/cputimer.h>
2
-
3
1
#include " query_uploader.h"
4
2
#include " util.h"
5
3
@@ -62,17 +60,12 @@ bool TUploader::Push(const TString& path, TValue&& value) {
62
60
63
61
if (status.IsSuccess ()) {
64
62
if (status.GetIssues ()) {
65
- LOG_ERR (" BulkUpsert has finished successfull, but has issues# {"
66
- << status.GetIssues ().ToString () << " }" );
63
+ LOG_W (" Bulk upsert was completed with issues: " << status.GetIssues ().ToOneLineString ());
67
64
}
68
65
return ;
69
66
// Since upsert of data is an idempotent operation it is possible to retry transport errors
70
67
} else if (status.IsTransportError () && retry < Opts.TransportErrorsMaxRetries ) {
71
- LOG_DEBUG (" Notice: transport error in BulkUpsert, issues# {" << status.GetIssues ().ToString () << " }"
72
- << " current Retry is " << retry
73
- << " < MaxRetries# " << Opts.TransportErrorsMaxRetries
74
- << " , so sleep for " << retrySleep.Seconds () << " s"
75
- << " and try again" );
68
+ LOG_D (" Retry bulk upsert: " << status.GetIssues ().ToOneLineString ());
76
69
++retry;
77
70
TInstant deadline = retrySleep.ToDeadLine ();
78
71
while (TInstant::Now () < deadline) {
@@ -84,9 +77,7 @@ bool TUploader::Push(const TString& path, TValue&& value) {
84
77
retrySleep *= 2 ;
85
78
continue ;
86
79
} else {
87
- LOG_ERR (" Error in BulkUpsert, so stop working. Issues# {" << status.GetIssues ().ToString () << " }"
88
- << " IsTransportError# " << (status.IsTransportError () ? " true" : " false" )
89
- << " retries done# " << retry);
80
+ LOG_E (" Bulk upsert failed: " << status.GetIssues ().ToOneLineString ());
90
81
PleaseStop ();
91
82
return ;
92
83
}
@@ -136,11 +127,10 @@ bool TUploader::Push(TParams params) {
136
127
137
128
if (status.IsSuccess ()) {
138
129
if (status.GetIssues ()) {
139
- LOG_ERR (" Upload tx has finished successfull, but has issues# {"
140
- << status.GetIssues ().ToString () << " }" );
130
+ LOG_W (" Write tx was completed with issues: " << status.GetIssues ().ToOneLineString ());
141
131
}
142
132
} else {
143
- LOG_ERR ( " Error in upload tx, issues# { " << status.GetIssues ().ToString () << " } " );
133
+ LOG_E ( " Write tx failed: " << status.GetIssues ().ToOneLineString () );
144
134
PleaseStop ();
145
135
return ;
146
136
}
0 commit comments