@@ -500,18 +500,14 @@ private <T> T execute(String tableName, TableExecuteCallback<T> callback, ObServ
500500 if (ex instanceof ObTableException ) {
501501 // errors needed to retry will retry until timeout
502502 if (((ObTableException ) ex ).isNeedRetryError ()) {
503- logger .warn (
503+ logger .info (
504504 "execute while meet server error in odp mode, need to retry, errorCode: {} , errorMsg: {}, try times {}" ,
505505 ((ObTableException ) ex ).getErrorCode (), ex .getMessage (),
506506 tryTimes );
507507 } else {
508- logger .warn ("meet table exception when execute in odp mode." +
509- "tablename: {}, errMsg: {}" , tableName , ex .getMessage ());
510508 throw ex ;
511509 }
512510 } else {
513- logger .warn ("meet exception when execute in odp mode." +
514- "tablename: {}, errMsg: {}" , tableName , ex .getMessage ());
515511 throw ex ;
516512 }
517513 } else {
@@ -522,18 +518,11 @@ private <T> T execute(String tableName, TableExecuteCallback<T> callback, ObServ
522518 route .addToBlackList (tableParam .getObTable ().getIp ());
523519 } else {
524520 logger .warn ("timeout, cause replica is not readable, tryTimes={}" , tryTimes );
525- RUNTIME .error ("replica not readable" , ex );
526521 throw ex ;
527522 }
528523 } else if (ex instanceof ObTableException
529524 && (((ObTableException ) ex ).isNeedRefreshTableEntry () || ((ObTableException ) ex ).isNeedRetryError ())) {
530525 if (ex instanceof ObTableNotExistException ) {
531- String logMessage = String .format (
532- "exhaust retry while meet TableNotExist Exception, table name: %s, errorCode: %d" ,
533- tableName ,
534- ((ObTableException ) ex ).getErrorCode ()
535- );
536- logger .warn (logMessage , ex );
537526 throw ex ;
538527 }
539528 if (retryOnChangeMasterTimes ) {
@@ -544,36 +533,16 @@ private <T> T execute(String tableName, TableExecuteCallback<T> callback, ObServ
544533 } else if (((ObTableException ) ex ).isNeedRetryError ()) {
545534 // retry server errors, no need to refresh partition location
546535 needRefreshPartitionLocation = false ;
547- logger .warn (
536+ logger .info (
548537 "execute while meet server error, need to retry, errorCode: {} , errorMsg: {}, try times {}" ,
549538 ((ObTableException ) ex ).getErrorCode (), ex .getMessage (),
550539 tryTimes );
551540 }
552541 } else {
553- String logMessage = String .format (
554- "retry is disabled while meet NeedRefresh Exception, table name: %s, errorCode: %d" ,
555- tableName ,
556- ((ObTableException ) ex ).getErrorCode ()
557- );
558- logger .warn (logMessage , ex );
559542 calculateContinuousFailure (tableName , ex .getMessage ());
560543 throw ex ;
561544 }
562545 } else {
563- String logMessage ;
564- if (ex instanceof ObTableException ) {
565- logMessage = String .format (
566- "exhaust retry while meet Exception, table name: %s, batch ops refresh table, errorCode: %d" ,
567- tableName ,
568- ((ObTableException ) ex ).getErrorCode ()
569- );
570- } else {
571- logMessage = String .format (
572- "exhaust retry while meet Exception, table name: %s, batch ops refresh table" ,
573- tableName
574- );
575- }
576- logger .warn (logMessage , ex );
577546 if (ex instanceof ObTableTransportException &&
578547 ((ObTableTransportException ) ex ).getErrorCode () == TransportCodes .BOLT_TIMEOUT ) {
579548 logger .debug ("client execute meet transport timeout, obTable ip:port is {}:{}" ,
@@ -736,18 +705,14 @@ private <T> T execute(String tableName, OperationExecuteCallback<T> callback,
736705 if (ex instanceof ObTableException ) {
737706 // errors needed to retry will retry until timeout
738707 if (((ObTableException ) ex ).isNeedRetryError ()) {
739- logger .warn (
708+ logger .info (
740709 "execute while meet server error in odp mode, need to retry, errorCode: {} , errorMsg: {}, try times {}" ,
741710 ((ObTableException ) ex ).getErrorCode (), ex .getMessage (),
742711 tryTimes );
743712 } else {
744- logger .warn ("meet table exception when execute in odp mode." +
745- "tablename: {}, errMsg: {}" , tableName , ex .getMessage ());
746713 throw ex ;
747714 }
748715 } else {
749- logger .warn ("meet exception when execute in odp mode." +
750- "tablename: {}, errMsg: {}" , tableName , ex .getMessage ());
751716 throw ex ;
752717 }
753718 } else {
@@ -758,18 +723,11 @@ private <T> T execute(String tableName, OperationExecuteCallback<T> callback,
758723 route .addToBlackList (tableParam .getObTable ().getIp ());
759724 } else {
760725 logger .warn ("timeout, cause replica is not readable, tryTimes={}" , tryTimes );
761- RUNTIME .error ("replica not readable" , ex );
762726 throw ex ;
763727 }
764728 } else if (ex instanceof ObTableException
765729 && (((ObTableException ) ex ).isNeedRefreshTableEntry () || ((ObTableException ) ex ).isNeedRetryError ())) {
766730 if (ex instanceof ObTableNotExistException ) {
767- String logMessage = String .format (
768- "exhaust retry while meet TableNotExist Exception, table name: %s, errorCode: %d" ,
769- tableName ,
770- ((ObTableException ) ex ).getErrorCode ()
771- );
772- logger .warn (logMessage , ex );
773731 throw ex ;
774732 }
775733 if (retryOnChangeMasterTimes ) {
@@ -784,36 +742,18 @@ private <T> T execute(String tableName, OperationExecuteCallback<T> callback,
784742 } else if (((ObTableException ) ex ).isNeedRetryError ()) {
785743 // retry server errors, no need to refresh partition location
786744 needRefreshPartitionLocation = false ;
787- logger .warn (
745+ logger .info (
788746 "execute while meet server error, need to retry, errorCode: {} , errorMsg: {}, try times {}" ,
789747 ((ObTableException ) ex ).getErrorCode (), ex .getMessage (),
790748 tryTimes );
791749 }
792750 } else {
793- String logMessage = String .format (
794- "retry is disabled while meet NeedRefresh Exception, table name: %s, errorCode: %d" ,
795- tableName ,
796- ((ObTableException ) ex ).getErrorCode ()
797- );
798- logger .warn (logMessage , ex );
799751 calculateContinuousFailure (tableName , ex .getMessage ());
800- throw new ObTableRetryExhaustedException (logMessage , ex );
752+ throw new ObTableRetryExhaustedException ("it has tried to execute batch ops after "
753+ + tryTimes + " times and it has waited " + costMillis + " ms which exceeds response timeout "
754+ + runtimeMaxWait + " ms" + " for table name: " + tableName , ex );
801755 }
802756 } else {
803- String logMessage ;
804- if (ex instanceof ObTableException ) {
805- logMessage = String .format (
806- "exhaust retry while meet Exception, table name: %s, batch ops refresh table, errorCode: %d" ,
807- tableName ,
808- ((ObTableException ) ex ).getErrorCode ()
809- );
810- } else {
811- logMessage = String .format (
812- "exhaust retry while meet Exception, table name: %s, batch ops refresh table" ,
813- tableName
814- );
815- }
816- logger .warn (logMessage , ex );
817757 if (ex instanceof ObTableTransportException &&
818758 ((ObTableTransportException ) ex ).getErrorCode () == TransportCodes .BOLT_TIMEOUT ) {
819759 logger .debug ("client execute meet transport timeout, obTable ip:port is {}:{}" ,
@@ -849,7 +789,7 @@ public void calculateContinuousFailure(String tableName, String errorMsg) throws
849789 tableRoute .refreshMeta (tableName );
850790 failures .set (0 );
851791 } else {
852- logger .warn ("error msg: {}, current continues failure count: {}" , errorMsg , failures );
792+ logger .info ("error msg: {}, current continues failure count: {}" , errorMsg , failures );
853793 }
854794 }
855795
@@ -2102,7 +2042,7 @@ public ObPayload executeWithRetry(ObTable obTable, ObPayload request, String tab
21022042 result = obTable .execute (request );
21032043 if (result instanceof ObTableApiMove ) {
21042044 ObTableApiMove move = (ObTableApiMove ) result ;
2105- logger .warn ("The server has not yet completed the master switch, and returned an incorrect leader with an IP address of {}. " +
2045+ logger .info ("The server has not yet completed the master switch, and returned an incorrect leader with an IP address of {}. " +
21062046 "Rerouting return IP is {}" , moveResponse .getReplica ().getServer ().ipToString (), move .getReplica ().getServer ().ipToString ());
21072047 throw new ObTableRoutingWrongException ();
21082048 }
@@ -2304,11 +2244,6 @@ public ObPayload execute(final ObTableAbstractOperationRequest request) throws E
23042244 long currentExecute = System .currentTimeMillis ();
23052245 long costMillis = currentExecute - startExecute ;
23062246 if (costMillis > getRuntimeMaxWait ()) {
2307- logger .error (
2308- "tablename:{} it has tried " + tryTimes
2309- + " times and it has waited " + costMillis
2310- + "/ms which exceeds response timeout "
2311- + getRuntimeMaxWait () + "/ms" , request .getTableName ());
23122247 throw new ObTableTimeoutExcetion ("it has tried " + tryTimes
23132248 + " times and it has waited " + costMillis
23142249 + "/ms which exceeds response timeout "
@@ -2370,29 +2305,25 @@ public ObPayload execute(final ObTableAbstractOperationRequest request) throws E
23702305 if (ex instanceof ObTableException ) {
23712306 // errors needed to retry will retry until timeout
23722307 if (((ObTableException ) ex ).isNeedRetryError ()) {
2373- logger .warn (
2308+ logger .info (
23742309 "meet need retry exception when execute queryAndMutate in odp mode. tablename: {}, errorCode: {} , errorMsg: {}, try times {}" ,
23752310 request .getTableName (), ((ObTableException ) ex ).getErrorCode (),
23762311 ex .getMessage (), tryTimes );
23772312 } else {
2378- logger .warn ("meet table exception when execute queryAndMutate in odp mode. tablename: {}, errMsg: {}"
2379- , request .getTableName (), ex .getMessage ());
23802313 throw ex ;
23812314 }
23822315 } else {
2383- logger .warn ("meet exception when execute queryAndMutate in odp mode. tablename: {}, errMsg: {}" ,
2384- request .getTableName (), ex .getMessage ());
23852316 throw ex ;
23862317 }
23872318 } else {
23882319 if (ex instanceof ObTableException &&
23892320 (((ObTableException ) ex ).isNeedRefreshTableEntry () || ((ObTableException ) ex ).isNeedRetryError ())) {
2390- logger .warn (
2321+ logger .info (
23912322 "tablename:{} partition id:{} batch ops refresh table while meet ObTableMasterChangeException, errorCode: {}" ,
23922323 request .getTableName (), routeTabletId , ((ObTableException ) ex ).getErrorCode (), ex );
23932324
23942325 if (isRetryOnChangeMasterTimes ()) {
2395- logger .warn (
2326+ logger .info (
23962327 "tablename:{} partition id:{} batch ops retry while meet ObTableMasterChangeException, errorCode: {} , retry times {}" ,
23972328 request .getTableName (), routeTabletId , ((ObTableException ) ex ).getErrorCode (),
23982329 tryTimes , ex );
0 commit comments