This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new f4ea58066b Ignore case when checking for Direct Memory OOM (#12657)
f4ea58066b is described below
commit f4ea58066b8b2db4c9c04502fd7bf6574cae81c0
Author: Erich <[email protected]>
AuthorDate: Mon Mar 18 17:05:54 2024 -0400
Ignore case when checking for Direct Memory OOM (#12657)
---
.../main/java/org/apache/pinot/core/transport/DirectOOMHandler.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/pinot-core/src/main/java/org/apache/pinot/core/transport/DirectOOMHandler.java
b/pinot-core/src/main/java/org/apache/pinot/core/transport/DirectOOMHandler.java
index dc79c0ba95..0ba00327f6 100644
---
a/pinot-core/src/main/java/org/apache/pinot/core/transport/DirectOOMHandler.java
+++
b/pinot-core/src/main/java/org/apache/pinot/core/transport/DirectOOMHandler.java
@@ -22,6 +22,7 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.commons.lang3.StringUtils;
import org.apache.pinot.common.metrics.BrokerMeter;
import org.apache.pinot.common.metrics.BrokerMetrics;
import org.apache.pinot.spi.exception.QueryCancelledException;
@@ -65,7 +66,8 @@ public class DirectOOMHandler extends
ChannelInboundHandlerAdapter {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
throws Exception {
// catch direct memory oom here
- if (cause instanceof OutOfMemoryError &&
cause.getMessage().contains("Direct buffer")) {
+ if (cause instanceof OutOfMemoryError
+ && StringUtils.containsIgnoreCase(cause.getMessage(), "direct
buffer")) {
BrokerMetrics.get().addMeteredGlobalValue(BrokerMeter.DIRECT_MEMORY_OOM,
1L);
// only one thread can get here and do the shutdown
if (DIRECT_OOM_SHUTTING_DOWN.compareAndSet(false, true)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]