This is an automated email from the ASF dual-hosted git repository.

justinchen pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/dev/1.3 by this push:
     new 371a18a8258 [To dev/1.3] Subscription: Prevent 
IllegalArgumentException in SubscriptionLogStatus by validating bounds for 
nextLong (#16447) (#16449)
371a18a8258 is described below

commit 371a18a8258d87209bbdbfcb30cbcb210d7752b9
Author: VGalaxies <[email protected]>
AuthorDate: Fri Sep 19 18:46:37 2025 +0800

    [To dev/1.3] Subscription: Prevent IllegalArgumentException in 
SubscriptionLogStatus by validating bounds for nextLong (#16447) (#16449)
---
 .../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,

Reply via email to