public RateLimiter getRateLimiter ( ) { double currentThroughput = DatabaseDescriptor . getCompactionThroughputMbPerSec ( ) * 1024.0 * 1024.0 ; // if throughput is set to 0, throttling is disabled if ( currentThroughput == 0 || StorageService . instance . isBootstrapMode ( ) ) currentThroughput = Double . MAX_VALUE ; if ( compactionRateLimiter . getRate ( ) != currentThroughput ) compactionRateLimiter . setRate ( currentThroughput ) ; return compactionRateLimiter ; }
Gets compaction rate limiter . When compaction_throughput_mb_per_sec is 0 or node is bootstrapping this returns rate limiter with the rate of Double . MAX_VALUE bytes per second . Rate unit is bytes per sec .