@@ -275,15 +275,11 @@ private void execute(boolean flushAll) throws IOException {
275
275
// if commit all successfully, clean execBuffer
276
276
execBuffer .clear ();
277
277
} catch (Exception ex ) {
278
- LOGGER .error (LCD .convert ("01-00026" ), ex );
279
- if (ex .getCause () instanceof RetriesExhaustedWithDetailsException ) {
280
- LOGGER .error (tableName + ": One or more of the operations have failed after retries." );
281
- RetriesExhaustedWithDetailsException retryException = (RetriesExhaustedWithDetailsException ) ex .getCause ();
282
- // recollect failed mutations
283
- execBuffer .clear ();
284
- for (int i = 0 ; i < retryException .getNumExceptions (); ++i ) {
285
- execBuffer .add ((Mutation ) retryException .getRow (i ));
286
- }
278
+ // do not recollect error operations, notify outside
279
+ LOGGER .error ("error happens, table name: {}" , tableName .getNameAsString (), ex );
280
+ if (ex instanceof RetriesExhaustedWithDetailsException ) {
281
+ LOGGER .error ("TableName: {}, One or more of the operations have failed after retries." , tableName .getNameAsString (), ex );
282
+ RetriesExhaustedWithDetailsException retryException = (RetriesExhaustedWithDetailsException ) ex ;
287
283
if (listener != null ) {
288
284
listener .onException (retryException , this );
289
285
} else {
@@ -293,13 +289,6 @@ private void execute(boolean flushAll) throws IOException {
293
289
LOGGER .error ("Errors unrelated to operations occur during mutation operation" , ex );
294
290
throw ex ;
295
291
}
296
- } finally {
297
- for (Mutation mutation : execBuffer ) {
298
- long size = mutation .heapSize ();
299
- currentAsyncBufferSize .addAndGet (size );
300
- asyncWriteBuffer .add (mutation );
301
- undealtMutationCount .incrementAndGet ();
302
- }
303
292
}
304
293
}
305
294
0 commit comments