@@ -503,18 +503,14 @@ private <T> T execute(String tableName, TableExecuteCallback<T> callback, ObServ
503503 if (ex instanceof ObTableException ) {
504504 // errors needed to retry will retry until timeout
505505 if (((ObTableException ) ex ).isNeedRetryError ()) {
506- logger .warn (
506+ logger .info (
507507 "execute while meet server error in odp mode, need to retry, errorCode: {} , errorMsg: {}, try times {}" ,
508508 ((ObTableException ) ex ).getErrorCode (), ex .getMessage (),
509509 tryTimes );
510510 } else {
511- logger .warn ("meet table exception when execute in odp mode." +
512- "tablename: {}, errMsg: {}" , tableName , ex .getMessage ());
513511 throw ex ;
514512 }
515513 } else {
516- logger .warn ("meet exception when execute in odp mode." +
517- "tablename: {}, errMsg: {}" , tableName , ex .getMessage ());
518514 throw ex ;
519515 }
520516 } else {
@@ -525,18 +521,11 @@ private <T> T execute(String tableName, TableExecuteCallback<T> callback, ObServ
525521 route .addToBlackList (tableParam .getObTable ().getIp ());
526522 } else {
527523 logger .warn ("timeout, cause replica is not readable, tryTimes={}" , tryTimes );
528- RUNTIME .error ("replica not readable" , ex );
529524 throw ex ;
530525 }
531526 } else if (ex instanceof ObTableException
532527 && (((ObTableException ) ex ).isNeedRefreshTableEntry () || ((ObTableException ) ex ).isNeedRetryError ())) {
533528 if (ex instanceof ObTableNotExistException ) {
534- String logMessage = String .format (
535- "exhaust retry while meet TableNotExist Exception, table name: %s, errorCode: %d" ,
536- tableName ,
537- ((ObTableException ) ex ).getErrorCode ()
538- );
539- logger .warn (logMessage , ex );
540529 throw ex ;
541530 }
542531 if (retryOnChangeMasterTimes ) {
@@ -547,36 +536,16 @@ private <T> T execute(String tableName, TableExecuteCallback<T> callback, ObServ
547536 } else if (((ObTableException ) ex ).isNeedRetryError ()) {
548537 // retry server errors, no need to refresh partition location
549538 needRefreshPartitionLocation = false ;
550- logger .warn (
539+ logger .info (
551540 "execute while meet server error, need to retry, errorCode: {} , errorMsg: {}, try times {}" ,
552541 ((ObTableException ) ex ).getErrorCode (), ex .getMessage (),
553542 tryTimes );
554543 }
555544 } else {
556- String logMessage = String .format (
557- "retry is disabled while meet NeedRefresh Exception, table name: %s, errorCode: %d" ,
558- tableName ,
559- ((ObTableException ) ex ).getErrorCode ()
560- );
561- logger .warn (logMessage , ex );
562545 calculateContinuousFailure (tableName , ex .getMessage ());
563546 throw ex ;
564547 }
565548 } else {
566- String logMessage ;
567- if (ex instanceof ObTableException ) {
568- logMessage = String .format (
569- "exhaust retry while meet Exception, table name: %s, batch ops refresh table, errorCode: %d" ,
570- tableName ,
571- ((ObTableException ) ex ).getErrorCode ()
572- );
573- } else {
574- logMessage = String .format (
575- "exhaust retry while meet Exception, table name: %s, batch ops refresh table" ,
576- tableName
577- );
578- }
579- logger .warn (logMessage , ex );
580549 if (ex instanceof ObTableTransportException &&
581550 ((ObTableTransportException ) ex ).getErrorCode () == TransportCodes .BOLT_TIMEOUT ) {
582551 logger .debug ("client execute meet transport timeout, obTable ip:port is {}:{}" ,
@@ -728,18 +697,14 @@ private <T> T execute(String tableName, OperationExecuteCallback<T> callback,
728697 if (ex instanceof ObTableException ) {
729698 // errors needed to retry will retry until timeout
730699 if (((ObTableException ) ex ).isNeedRetryError ()) {
731- logger .warn (
700+ logger .info (
732701 "execute while meet server error in odp mode, need to retry, errorCode: {} , errorMsg: {}, try times {}" ,
733702 ((ObTableException ) ex ).getErrorCode (), ex .getMessage (),
734703 tryTimes );
735704 } else {
736- logger .warn ("meet table exception when execute in odp mode." +
737- "tablename: {}, errMsg: {}" , tableName , ex .getMessage ());
738705 throw ex ;
739706 }
740707 } else {
741- logger .warn ("meet exception when execute in odp mode." +
742- "tablename: {}, errMsg: {}" , tableName , ex .getMessage ());
743708 throw ex ;
744709 }
745710 } else {
@@ -750,18 +715,11 @@ private <T> T execute(String tableName, OperationExecuteCallback<T> callback,
750715 route .addToBlackList (tableParam .getObTable ().getIp ());
751716 } else {
752717 logger .warn ("timeout, cause replica is not readable, tryTimes={}" , tryTimes );
753- RUNTIME .error ("replica not readable" , ex );
754718 throw ex ;
755719 }
756720 } else if (ex instanceof ObTableException
757721 && (((ObTableException ) ex ).isNeedRefreshTableEntry () || ((ObTableException ) ex ).isNeedRetryError ())) {
758722 if (ex instanceof ObTableNotExistException ) {
759- String logMessage = String .format (
760- "exhaust retry while meet TableNotExist Exception, table name: %s, errorCode: %d" ,
761- tableName ,
762- ((ObTableException ) ex ).getErrorCode ()
763- );
764- logger .warn (logMessage , ex );
765723 throw ex ;
766724 }
767725 if (retryOnChangeMasterTimes ) {
@@ -775,36 +733,18 @@ private <T> T execute(String tableName, OperationExecuteCallback<T> callback,
775733 } else if (((ObTableException ) ex ).isNeedRetryError ()) {
776734 // retry server errors, no need to refresh partition location
777735 needRefreshPartitionLocation = false ;
778- logger .warn (
736+ logger .info (
779737 "execute while meet server error, need to retry, errorCode: {} , errorMsg: {}, try times {}" ,
780738 ((ObTableException ) ex ).getErrorCode (), ex .getMessage (),
781739 tryTimes );
782740 }
783741 } else {
784- String logMessage = String .format (
785- "retry is disabled while meet NeedRefresh Exception, table name: %s, errorCode: %d" ,
786- tableName ,
787- ((ObTableException ) ex ).getErrorCode ()
788- );
789- logger .warn (logMessage , ex );
790742 calculateContinuousFailure (tableName , ex .getMessage ());
791- throw new ObTableRetryExhaustedException (logMessage , ex );
743+ throw new ObTableRetryExhaustedException ("it has tried to execute batch ops after "
744+ + tryTimes + " times and it has waited " + costMillis + " ms which exceeds response timeout "
745+ + runtimeMaxWait + " ms" + " for table name: " + tableName , ex );
792746 }
793747 } else {
794- String logMessage ;
795- if (ex instanceof ObTableException ) {
796- logMessage = String .format (
797- "exhaust retry while meet Exception, table name: %s, batch ops refresh table, errorCode: %d" ,
798- tableName ,
799- ((ObTableException ) ex ).getErrorCode ()
800- );
801- } else {
802- logMessage = String .format (
803- "exhaust retry while meet Exception, table name: %s, batch ops refresh table" ,
804- tableName
805- );
806- }
807- logger .warn (logMessage , ex );
808748 if (ex instanceof ObTableTransportException &&
809749 ((ObTableTransportException ) ex ).getErrorCode () == TransportCodes .BOLT_TIMEOUT ) {
810750 logger .debug ("client execute meet transport timeout, obTable ip:port is {}:{}" ,
@@ -840,7 +780,7 @@ public void calculateContinuousFailure(String tableName, String errorMsg) throws
840780 refreshMeta (tableName );
841781 failures .set (0 );
842782 } else {
843- logger .warn ("error msg: {}, current continues failure count: {}" , errorMsg , failures );
783+ logger .info ("error msg: {}, current continues failure count: {}" , errorMsg , failures );
844784 }
845785 }
846786
@@ -2098,7 +2038,7 @@ public ObPayload executeWithRetry(ObTable obTable, ObPayload request, String tab
20982038 result = obTable .execute (request );
20992039 if (result instanceof ObTableApiMove ) {
21002040 ObTableApiMove move = (ObTableApiMove ) result ;
2101- logger .warn ("The server has not yet completed the master switch, and returned an incorrect leader with an IP address of {}. " +
2041+ logger .info ("The server has not yet completed the master switch, and returned an incorrect leader with an IP address of {}. " +
21022042 "Rerouting return IP is {}" , moveResponse .getReplica ().getServer ().ipToString (), move .getReplica ().getServer ().ipToString ());
21032043 throw new ObTableRoutingWrongException ();
21042044 }
@@ -2284,11 +2224,6 @@ public ObPayload execute(final ObTableAbstractOperationRequest request) throws E
22842224 long currentExecute = System .currentTimeMillis ();
22852225 long costMillis = currentExecute - startExecute ;
22862226 if (costMillis > getRuntimeMaxWait ()) {
2287- logger .error (
2288- "tablename:{} it has tried " + tryTimes
2289- + " times and it has waited " + costMillis
2290- + "/ms which exceeds response timeout "
2291- + getRuntimeMaxWait () + "/ms" , request .getTableName ());
22922227 throw new ObTableTimeoutExcetion ("it has tried " + tryTimes
22932228 + " times and it has waited " + costMillis
22942229 + "/ms which exceeds response timeout "
@@ -2334,29 +2269,25 @@ public ObPayload execute(final ObTableAbstractOperationRequest request) throws E
23342269 if (ex instanceof ObTableException ) {
23352270 // errors needed to retry will retry until timeout
23362271 if (((ObTableException ) ex ).isNeedRetryError ()) {
2337- logger .warn (
2272+ logger .info (
23382273 "meet need retry exception when execute queryAndMutate in odp mode. tablename: {}, errorCode: {} , errorMsg: {}, try times {}" ,
23392274 request .getTableName (), ((ObTableException ) ex ).getErrorCode (),
23402275 ex .getMessage (), tryTimes );
23412276 } else {
2342- logger .warn ("meet table exception when execute queryAndMutate in odp mode. tablename: {}, errMsg: {}"
2343- , request .getTableName (), ex .getMessage ());
23442277 throw ex ;
23452278 }
23462279 } else {
2347- logger .warn ("meet exception when execute queryAndMutate in odp mode. tablename: {}, errMsg: {}" ,
2348- request .getTableName (), ex .getMessage ());
23492280 throw ex ;
23502281 }
23512282 } else {
23522283 if (ex instanceof ObTableException &&
23532284 (((ObTableException ) ex ).isNeedRefreshTableEntry () || ((ObTableException ) ex ).isNeedRetryError ())) {
2354- logger .warn (
2285+ logger .info (
23552286 "tablename:{} partition id:{} batch ops refresh table while meet ObTableMasterChangeException, errorCode: {}" ,
23562287 request .getTableName (), request .getPartitionId (), ((ObTableException ) ex ).getErrorCode (), ex );
23572288
23582289 if (isRetryOnChangeMasterTimes ()) {
2359- logger .warn (
2290+ logger .info (
23602291 "tablename:{} partition id:{} batch ops retry while meet ObTableMasterChangeException, errorCode: {} , retry times {}" ,
23612292 request .getTableName (), request .getPartitionId (), ((ObTableException ) ex ).getErrorCode (),
23622293 tryTimes , ex );
0 commit comments