5353public class ObTableClientLSBatchOpsImpl extends AbstractTableBatchOps {
5454
5555 private static final Logger logger = TableClientLoggerFactory
56- .getLogger (ObTableClientBatchOpsImpl .class );
56+ .getLogger (ObTableClientLSBatchOpsImpl .class );
5757 private final ObTableClient obTableClient ;
5858 private ExecutorService executorService ;
5959 private boolean returningAffectedEntity = false ;
@@ -562,21 +562,23 @@ public void partitionExecute(ObTableSingleOpResult[] results,
562562 } else if (ex instanceof ObTableException
563563 && ((ObTableException ) ex ).isNeedRefreshTableEntry ()) {
564564 needRefreshTableEntry = true ;
565- logger .warn ("tablename:{} ls id:{} batch ops refresh table while meet ObTableMasterChangeException, errorCode: {}" ,
566- realTableName , lsId , ((ObTableException ) ex ).getErrorCode (), ex );
567565 if (obTableClient .isRetryOnChangeMasterTimes ()
568566 && (tryTimes - 1 ) < obTableClient .getRuntimeRetryTimes ()) {
569567 if (ex instanceof ObTableNeedFetchAllException ) {
570- logger .warn ("tablename:{} ls id:{} batch ops retry while meet ObTableNeedFetchAllException, errorCode: {} , retry times {}" ,
571- realTableName , lsId , ((ObTableException ) ex ).getErrorCode (),
572- tryTimes , ex );
573568 obTableClient .getOrRefreshTableEntry (realTableName , needRefreshTableEntry ,
574569 obTableClient .isTableEntryRefreshIntervalWait (), true );
575570 throw ex ;
576571 }
577572 } else {
573+ String logMessage = String .format (
574+ "exhaust retry while meet NeedRefresh Exception, table name: %s, ls id: %d, batch ops refresh table, errorCode: %d" ,
575+ realTableName ,
576+ lsId ,
577+ ((ObTableException ) ex ).getErrorCode ()
578+ );
579+ logger .warn (logMessage , ex );
578580 obTableClient .calculateContinuousFailure (realTableName , ex .getMessage ());
579- throw ex ;
581+ throw new ObTableRetryExhaustedException ( logMessage , ex ) ;
580582 }
581583 } else {
582584 obTableClient .calculateContinuousFailure (realTableName , ex .getMessage ());
@@ -589,9 +591,11 @@ public void partitionExecute(ObTableSingleOpResult[] results,
589591 long endExecute = System .currentTimeMillis ();
590592
591593 if (subLSOpResult == null ) {
592- RUNTIME .error ("table name:{} ls id:{} check batch operation result error: client get unexpected NULL result" ,
594+ String logMessage = String .format (
595+ "table name: %s ls id: %d check batch operation result error: client get unexpected NULL result" ,
593596 realTableName , lsId );
594- throw new ObTableUnexpectedException ("check batch operation result error: client get unexpected NULL result" );
597+ RUNTIME .error (logMessage );
598+ throw new ObTableUnexpectedException (logMessage );
595599 }
596600
597601 List <ObTableTabletOpResult > tabletOpResults = subLSOpResult .getResults ();
0 commit comments