You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ConfX (Jira)" <ji...@apache.org> on 2024/04/05 08:48:00 UTC
[jira] [Created] (HBASE-28487) Division by zero encountered when using BloomFilter with a misconfiguration
ConfX created HBASE-28487:
-----------------------------
Summary: Division by zero encountered when using BloomFilter with a misconfiguration
Key: HBASE-28487
URL: https://issues.apache.org/jira/browse/HBASE-28487
Project: HBase
Issue Type: Bug
Reporter: ConfX
h2. What happened:
Got Division by 0 when trying to run org.apache.hadoop.hbase.procedure2.store.region.TestHFileProcedurePrettyPrinter#test with io.storefile.bloom.max.fold set too large.
h2. Buggy code:
In BloomFilterUtil.java:
{code:java}
public static int optimalFunctionCount(int maxKeys, long bitSize) {
long i = bitSize / maxKeys; // here maxKeys might be zero
...
}
{code}
h2. StackTrace:
{code:java}
org.apache.hadoop.hbase.DroppedSnapshotException: region: master:store,,1.1595e783b53d99cd5eef43b6debb2682.
…
Caused by: java.lang.ArithmeticException: / by zero
at org.apache.hadoop.hbase.util.BloomFilterUtil.optimalFunctionCount(BloomFilterUtil.java:143)
at org.apache.hadoop.hbase.util.BloomFilterUtil.createBySize(BloomFilterUtil.java:167){code}
h2. How to reproduce:
(1) Set io.storefile.bloom.max.fold to 73830463
(2) Run test: org.apache.hadoop.hbase.procedure2.store.region.TestHFileProcedurePrettyPrinter#test
--
This message was sent by Atlassian Jira
(v8.20.10#820010)