Skip to content

Commit

Permalink
Merge pull request #17 from wqliang/fixPotentialOverflow
Browse files Browse the repository at this point in the history
fix potential overflow and limit upper bound
  • Loading branch information
qqeasonchen authored May 8, 2020
2 parents 0deef8b + 14376b6 commit 305eef0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ private void adjustQueueNumByConsumerCount(String topic, AdjustType scaleType) {

case DECREASE_QUEUE_NUM:
adjustWriteQueueNumByConsumerCount(topic, 0, scaleType);
long delayTimeMillis = deFiBrokerController.getDeFiBusBrokerConfig().getScaleQueueSizeDelayTimeMinute() * 60 * 1000;
long delayTimeMinutes = Math.min(deFiBrokerController.getDeFiBusBrokerConfig().getScaleQueueSizeDelayTimeMinute(), 10);
long delayTimeMillis = delayTimeMinutes * 60 * 1000;
adjustReadQueueNumByConsumerCount(topic, delayTimeMillis, scaleType);
break;
}
Expand Down

0 comments on commit 305eef0

Please sign in to comment.