You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2024/03/28 15:57:00 UTC
(hbase) branch branch-2.5 updated (7f2ae00324a -> 5134eedce68)
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a change to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
from 7f2ae00324a HBASE-28314 Enable maven-source-plugin for all modules (#5753)
new bb094dc33df HBASE-27990 BucketCache causes ArithmeticException due to improper blockSize value checking (#5389)
new 0c54d88e8e3 HBASE-27989 ByteBuffAllocator causes ArithmeticException due to improper poolBufSize value checking (#5388)
new 919c8915ad9 HBASE-28452 Missing null check of rpcServer.scheduler.executor causes NPE with invalid value of hbase.client.default.rpc.codec (#5778)
new 5134eedce68 HBASE-27993 AbstractFSWAL causes ArithmeticException due to improper logRollSize value checking (#5390)
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../main/java/org/apache/hadoop/hbase/io/ByteBuffAllocator.java | 8 ++++++++
.../java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java | 2 ++
.../main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java | 4 +++-
.../org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java | 3 +++
4 files changed, 16 insertions(+), 1 deletion(-)
(hbase) 01/04: HBASE-27990 BucketCache causes ArithmeticException due to improper blockSize value checking (#5389)
Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit bb094dc33dfb691b69a3b575558a0411592f941a
Author: ConfX <11...@users.noreply.github.com>
AuthorDate: Thu Mar 28 23:01:23 2024 +0800
HBASE-27990 BucketCache causes ArithmeticException due to improper blockSize value checking (#5389)
Signed-off-by: Duo Zhang <zh...@apache.org>
(cherry picked from commit 5a0c4de66b16281b25fd14bfbe2ee60d0657b8a3)
---
.../main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index 3da99ddcf78..2854ff598dd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -255,6 +255,8 @@ public class BucketCache implements BlockCache, HeapSize {
public BucketCache(String ioEngineName, long capacity, int blockSize, int[] bucketSizes,
int writerThreadNum, int writerQLen, String persistencePath, int ioErrorsTolerationDuration,
Configuration conf) throws IOException {
+ Preconditions.checkArgument(blockSize > 0,
+ "BucketCache capacity is set to " + blockSize + ", can not be less than 0");
this.algorithm = conf.get(FILE_VERIFY_ALGORITHM, DEFAULT_FILE_VERIFY_ALGORITHM);
this.ioEngine = getIOEngineFromName(ioEngineName, capacity, persistencePath);
this.writerThreads = new WriterThread[writerThreadNum];
(hbase) 02/04: HBASE-27989 ByteBuffAllocator causes ArithmeticException due to improper poolBufSize value checking (#5388)
Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit 0c54d88e8e362710c0303a7d0ef781cb92fbf6bf
Author: ConfX <11...@users.noreply.github.com>
AuthorDate: Thu Mar 28 23:01:40 2024 +0800
HBASE-27989 ByteBuffAllocator causes ArithmeticException due to improper poolBufSize value checking (#5388)
Signed-off-by: Duo Zhang <zh...@apache.org>
(cherry picked from commit bfc537562c86c5b41a52a1eff50bc6c85e89caf9)
---
.../main/java/org/apache/hadoop/hbase/io/ByteBuffAllocator.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBuffAllocator.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBuffAllocator.java
index 2176949b291..3a9484bd306 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBuffAllocator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBuffAllocator.java
@@ -175,11 +175,19 @@ public class ByteBuffAllocator {
// that by the time a handler originated response is actually done writing to socket and so
// released the BBs it used, the handler might have processed one more read req. On an avg 2x
// we consider and consider that also for the max buffers to pool
+ if (poolBufSize <= 0) {
+ throw new IllegalArgumentException(BUFFER_SIZE_KEY + " must be positive. Please disable "
+ + "the reservoir rather than setting the size of the buffer to zero or negative.");
+ }
int bufsForTwoMB = (2 * 1024 * 1024) / poolBufSize;
int maxBuffCount =
conf.getInt(MAX_BUFFER_COUNT_KEY, conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT,
HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT) * bufsForTwoMB * 2);
int minSizeForReservoirUse = conf.getInt(MIN_ALLOCATE_SIZE_KEY, poolBufSize / 6);
+ if (minSizeForReservoirUse <= 0) {
+ LOG.warn("The minimal size for reservoir use is less or equal to zero, all allocations "
+ + "will be from the pool. Set a higher " + MIN_ALLOCATE_SIZE_KEY + " to avoid this.");
+ }
Class<?> clazz = conf.getClass(BYTEBUFF_ALLOCATOR_CLASS, ByteBuffAllocator.class);
return (ByteBuffAllocator) ReflectionUtils.newInstance(clazz, true, maxBuffCount, poolBufSize,
minSizeForReservoirUse);
(hbase) 03/04: HBASE-28452 Missing null check of rpcServer.scheduler.executor causes NPE with invalid value of hbase.client.default.rpc.codec (#5778)
Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit 919c8915ad9752a57927c666c172d0db55f2cb92
Author: ConfX <11...@users.noreply.github.com>
AuthorDate: Thu Mar 28 23:02:07 2024 +0800
HBASE-28452 Missing null check of rpcServer.scheduler.executor causes NPE with invalid value of hbase.client.default.rpc.codec (#5778)
Signed-off-by: Duo Zhang <zh...@apache.org>
(cherry picked from commit f412bdbb9ad9810e9bf3db0b76f7f1dffff3d15d)
---
.../src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
index b1b2193d5b9..8d9b29c3ebf 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
@@ -68,7 +68,9 @@ public class FifoRpcScheduler extends RpcScheduler {
@Override
public void stop() {
- this.executor.shutdown();
+ if (this.executor != null) {
+ this.executor.shutdown();
+ }
}
private static class FifoCallRunner implements Runnable {
(hbase) 04/04: HBASE-27993 AbstractFSWAL causes ArithmeticException due to improper logRollSize value checking (#5390)
Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit 5134eedce686b1f2d4f64c3a29e57e6bbf261dd6
Author: ConfX <11...@users.noreply.github.com>
AuthorDate: Thu Mar 28 23:04:02 2024 +0800
HBASE-27993 AbstractFSWAL causes ArithmeticException due to improper logRollSize value checking (#5390)
Signed-off-by: Duo Zhang <zh...@apache.org>
Signed-off-by: Wei-Chiu Chuang <we...@apache.org>
(cherry picked from commit 8be9e51fdf474a94b12aab63332f8bb0344854f6)
---
.../java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
index dbeb66f8ae3..79033607deb 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
@@ -378,6 +378,9 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
}
private int calculateMaxLogFiles(Configuration conf, long logRollSize) {
+ checkArgument(logRollSize > 0,
+ "The log roll size cannot be zero or negative when calculating max log files, "
+ + "current value is " + logRollSize);
Pair<Long, MemoryType> globalMemstoreSize = MemorySizeUtil.getGlobalMemStoreSize(conf);
return (int) ((globalMemstoreSize.getFirst() * 2) / logRollSize);
}