This is an automated email from the ASF dual-hosted git repository.
twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 2215279c3 fix(config): disallow setting migrate-batch-rate-limit-mb to
zero (#3228)
2215279c3 is described below
commit 2215279c315a2d29011b22b9577f19a40f19ca61
Author: Lele Huang <[email protected]>
AuthorDate: Sat Oct 18 21:49:14 2025 +0800
fix(config): disallow setting migrate-batch-rate-limit-mb to zero (#3228)
If migrate-batch-rate-limit-mb value is 0,It will cause kvrocks
exception of Ooops! Apache Kvrocks version kvrocks_v2.12.1 got signal:
Floating point exception (8)
E20251017 18:06:35.174003 140710573499968 signal_util.h:33] Ooops!
Apache Kvrocks version kvrocks_v2.12.1 (commit 8d567341) got signal:
Floating point exception (8)
E20251017 18:07:39.142195 140710573499968 signal_util.h:35] Stack trace
(most recent call first):
#0 0x0000561196118d90 in SegvHandler at
/kvrocks/src/cli/signal_util.h:34
#1 0x00007ff9cec5751f in __sigaction at /lib/x86_64-linux-gnu/libc.so.6
#2 0x00005611965077ef in
rocksdb::GenericRateLimiter::CalculateRefillBytesPerPeriodLocked(long)
at /kvrocks/build/_deps/rocksdb-src/util/rate_limiter.cc:317
#3 0x0000561196507acb in rocksdb::NewGenericRateLimiter(long, long, int,
rocksdb::RateLimiter::Mode, bool, long) at
/kvrocks/build/_deps/rocksdb-src/util/rate_limiter.cc:387
#4 0x0000561195e8b100 in BatchSender::BatchSender(int, unsigned long,
unsigned long) at /kvrocks/src/cluster/batch_sender.h:35
#5 0x0000561195e9a889 in SlotMigrator::loop() at
/kvrocks/src/cluster/slot_migrate.cc:174
#6 0x000056119695d643 in execute_native_thread_routine at thread.o
#7 0x00007ff9ceca9ac2 in pthread_condattr_setpshared at
/lib/x86_64-linux-gnu/libc.so.6
#8 0x00007ff9ced3b8bf in __xmknodat at /lib/x86_64-linux-gnu/libc.so.6
E20251017 18:07:39.142345 140710573499968 signal_util.h:36] It would be
greatly appreciated if you could submit this crash to
https://github.com/apache/kvrocks/issues along with the stacktrace
above, logs and any relevant information.
---------
Co-authored-by: hulk <[email protected]>
---
kvrocks.conf | 3 ++-
src/config/config.cc | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kvrocks.conf b/kvrocks.conf
index c15252a08..48884a20b 100644
--- a/kvrocks.conf
+++ b/kvrocks.conf
@@ -717,7 +717,8 @@ migrate-sequence-gap 10000
migrate-batch-size-kb 16
# Rate limit for migration based on raw-key-value, representing the maximum
number of data
-# that can be migrated per second. 0 means no limit.
+# that can be migrated per second.
+# Value: [1, INT_MAX]
#
# Default: 16M
migrate-batch-rate-limit-mb 16
diff --git a/src/config/config.cc b/src/config/config.cc
index 1fd8f40b8..52690ca8e 100644
--- a/src/config/config.cc
+++ b/src/config/config.cc
@@ -227,7 +227,7 @@ Config::Config() {
{"migrate-type", false,
new EnumField<MigrationType>(&migrate_type, migration_types,
MigrationType::kRawKeyValue)},
{"migrate-batch-size-kb", false, new IntField(&migrate_batch_size_kb,
16, 1, INT_MAX)},
- {"migrate-batch-rate-limit-mb", false, new
IntField(&migrate_batch_rate_limit_mb, 16, 0, INT_MAX)},
+ {"migrate-batch-rate-limit-mb", false, new
IntField(&migrate_batch_rate_limit_mb, 16, 1, INT_MAX)},
{"unixsocket", true, new StringField(&unixsocket, "")},
{"unixsocketperm", true, new OctalField(&unixsocketperm, 0777, 1,
INT_MAX)},
{"log-retention-days", true, new IntField(&log_retention_days, -1, -1,
INT_MAX)},