Skip to content

Commit 07c2b5b

Browse files
HBASE-29679: Suppress stack trace in RpcThrottlingException (#7403)
Signed-off by: Ray Mattingly <[email protected]>
1 parent a79100b commit 07c2b5b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/RpcThrottlingException.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,15 @@ protected static long timeFromString(String timeDiff) {
205205
}
206206
return -1;
207207
}
208+
209+
/**
210+
* There is little value in an RpcThrottlingException having a stack trace, since its cause is
211+
* well understood without one. When a RegionServer is under heavy load and needs to serve many
212+
* RpcThrottlingExceptions, skipping fillInStackTrace() will save CPU time and allocations, both
213+
* here and later when the exception must be serialized over the wire.
214+
*/
215+
@Override
216+
public synchronized Throwable fillInStackTrace() {
217+
return this;
218+
}
208219
}

0 commit comments

Comments
 (0)