@@ -54,10 +54,7 @@ public class RpcRetryingCallerImpl<T> implements RpcRetryingCaller<T> {
5454 * When we started making calls.
5555 */
5656 private long globalStartTime ;
57- /**
58- * Start and end times for a single call.
59- */
60- private final static int MIN_RPC_TIMEOUT = 2000 ;
57+
6158 /** How many retries are allowed before we start to log */
6259 private final int startLogErrorsCnt ;
6360
@@ -87,11 +84,11 @@ private int getRemainingTime(int callTimeout) {
8784 if (callTimeout == Integer .MAX_VALUE ) return Integer .MAX_VALUE ;
8885 int remainingTime = (int ) (callTimeout -
8986 (EnvironmentEdgeManager .currentTime () - this .globalStartTime ));
90- if (remainingTime < MIN_RPC_TIMEOUT ) {
87+ if (remainingTime < 1 ) {
9188 // If there is no time left, we're trying anyway. It's too late.
9289 // 0 means no timeout, and it's not the intent here. So we secure both cases by
9390 // resetting to the minimum.
94- remainingTime = MIN_RPC_TIMEOUT ;
91+ remainingTime = 1 ;
9592 }
9693 return remainingTime ;
9794 }
@@ -222,7 +219,7 @@ static Throwable translateException(Throwable t) throws DoNotRetryIOException {
222219 }
223220 // Don't let ServiceException out; its rpc specific.
224221 t = cause ;
225- // t could be a RemoteException so go aaround again.
222+ // t could be a RemoteException so go around again.
226223 translateException (t );
227224 } else if (t instanceof DoNotRetryIOException ) {
228225 throw (DoNotRetryIOException )t ;
0 commit comments