This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new c49c06878e1 Subscription: Prevent IllegalArgumentException in
SubscriptionLogStatus by validating bounds for nextLong (#16447)
c49c06878e1 is described below
commit c49c06878e1e68f2028a1b2ba96cb33d315a3fb6
Author: VGalaxies <[email protected]>
AuthorDate: Fri Sep 19 18:09:29 2025 +0800
Subscription: Prevent IllegalArgumentException in SubscriptionLogStatus by
validating bounds for nextLong (#16447)
---
.../iotdb/db/subscription/resource/log/SubscriptionLogStatus.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/resource/log/SubscriptionLogStatus.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/resource/log/SubscriptionLogStatus.java
index 0daae1dc937..d1f0257531c 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/resource/log/SubscriptionLogStatus.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/resource/log/SubscriptionLogStatus.java
@@ -68,7 +68,7 @@ class SubscriptionLogStatus {
now
// introduce randomness
- BASE_INTERVAL_IN_MS
- * ThreadLocalRandom.current().nextLong(1,
count + 1))));
+ *
ThreadLocalRandom.current().nextLong(Math.max(count, 1)))));
final long last = lastTime.get();
if (now - last >= allowedInterval) {
// Use compareAndSet to ensure that only one thread updates at a time,