MergeRateLimiter

This is the RateLimiter that IndexWriter assigns to each running merge, to give MergeSchedulers ionice like control.

Constructors

Link copied to clipboard
constructor(mergeProgress: MergePolicy.OneMergeProgress)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var mBPerSec: Double

Sets an updated MB per second rate limit. A subclass is allowed to perform dynamic updates of the rate limit during use.

Link copied to clipboard
open override var minPauseCheckBytes: Long

How many bytes caller should add up itself before invoking .pause. NOTE: The value returned by this method may change over time and is not guaranteed to be constant throughout the lifetime of the RateLimiter. Users are advised to refresh their local values with calls to this method to ensure consistency.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns total bytes written by this merge.

Link copied to clipboard
open suspend override fun pause(bytes: Long): Long

Pauses, if necessary, to keep the instantaneous IO rate at or below the target.