[ 
https://issues.apache.org/jira/browse/HBASE-28487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HBASE-28487:
-----------------------------------
    Labels: pull-request-available  (was: )

> 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
>            Priority: Major
>              Labels: pull-request-available
>
> 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)

Reply via email to