Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public RetriesExhaustedException(final String msg, final IOException e) {
*/
@InterfaceAudience.Private
public static class ThrowableWithExtraContext {
private final Throwable throwable;
public final Throwable throwable;
private final long whenAsEpochMilli;
private final String extras;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import org.apache.hadoop.hbase.CallQueueTooBigException;
import org.apache.hadoop.hbase.DoNotRetryIOException;
import org.apache.hadoop.hbase.exceptions.PreemptiveFastFailException;
import org.apache.hadoop.hbase.quotas.RpcThrottlingException;
import org.apache.hadoop.hbase.quotas.ThrottlingException;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import org.apache.hadoop.hbase.util.ExceptionUtil;
import org.apache.hadoop.ipc.RemoteException;
Expand Down Expand Up @@ -102,7 +104,13 @@ public T callWithRetries(RetryingCallable<T> callable, int callTimeout)
long expectedSleep;
try {
// bad cache entries are cleared in the call to RetryingCallable#throwable() in catch block
callable.prepare(tries != 0);
Throwable t = null;
if (exceptions != null && !exceptions.isEmpty()) {
t = exceptions.get(exceptions.size() - 1).throwable;
}
if (!(t instanceof RpcThrottlingException)) {
callable.prepare(tries != 0);
}
interceptor.intercept(context.prepare(callable, tries));
return callable.call(getTimeout(callTimeout));
} catch (PreemptiveFastFailException e) {
Expand Down