Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Snapshot restore operations throttle more than specified #13828
Lucene's RateLimiter can do too much sleeping on small values (see also #6018).
Instead of simply adding the guard, this commit uses the RateLimitingInputStream similar as for "snapshotFile".
I'm very much in favour of back porting this to 1.7.x, as I saw a 10x slowdown on a production cluster.
I added your suggestions. Not closing the RateLimitingInputStream is ok, as it just delegates the close to PartSliceStream (which is now auto-closed).
Just banning RateLimiter.pause does not work as it is used in other places of ES (e.g. RecoverySourceHandler).