einhorn 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1efce2d994e722247d125519beafc697d83d60ef
4
- data.tar.gz: 8bd8a2e88d946f97362f5dc6e99195e1eb20d0b8
3
+ metadata.gz: 9ad5953d5d76feb2ece4284c0c69db2ab3aa42d6
4
+ data.tar.gz: a9e7290ffcf43ba56b5987bb51a3a45a94e18d84
5
5
  SHA512:
6
- metadata.gz: 821150f05033f26d74d21e514bf376edfd5a13d217a7b484236d6aea53fe7047534d2ea937bf71af47af80a1b986e65c90ebcef3b22555d20f98273dec694f67
7
- data.tar.gz: eb4de99469258fcab4170ceadb87481d1844bd71702bbfe87ca9534ec1a8a11fa06ad3ae63b9f509f60742ab8fcdc096c72153dcf7eb03481686380a3b976544
6
+ metadata.gz: 9170d915de608cc8b467c474cbafaafbf4d0dbcac6103d446a67f3897a0c119247a213f84858b344a7c8ce2fa251be8e4370880bf35fbe92808831192c6191e1
7
+ data.tar.gz: 92d76cdf34932a638be91c330219658570113b07bfeb76fe24291d74d6c374ee6b19939a9c120138ccc958f0af921ac6f99fa833211e7614dfd1df71c164f890
data/.travis.yml CHANGED
@@ -1,8 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
- - 1.9.2
5
- - 1.9.3
6
3
  - 2.0.0
7
4
  - 2.1
8
- - ree
5
+ - 2.2
6
+
7
+ # This is to work around the version of bundler installed in Travis and
8
+ # https://github.com/bundler/bundler/issues/3558
9
+ before_install:
10
+ - gem update bundler
@@ -478,6 +478,12 @@ module Einhorn
478
478
  missing.times {spinup}
479
479
  end
480
480
 
481
+ # Unbounded exponential backoff is not a thing: we run into problems if
482
+ # e.g., each of our hundred workers simultaneously fail to boot for the same
483
+ # ephemeral reason. Instead cap backoff by some reasonable maximum, so we
484
+ # don't wait until the heat death of the universe to spin up new capacity.
485
+ MAX_SPINUP_INTERVAL = 30.0
486
+
481
487
  def self.replenish_gradually(max_unacked=nil)
482
488
  return if Einhorn::TransientState.has_outstanding_spinup_timer
483
489
  return unless Einhorn::WorkerPool.missing_worker_count > 0
@@ -500,6 +506,7 @@ module Einhorn
500
506
  # Exponentially backoff automated spinup if we're just having
501
507
  # things die before ACKing
502
508
  spinup_interval = Einhorn::State.config[:seconds] * (1.5 ** Einhorn::State.consecutive_deaths_before_ack)
509
+ spinup_interval = [spinup_interval, MAX_SPINUP_INTERVAL].min
503
510
  seconds_ago = (Time.now - Einhorn::State.last_spinup).to_f
504
511
 
505
512
  if seconds_ago > spinup_interval
@@ -335,9 +335,9 @@ EOF
335
335
  end
336
336
 
337
337
  count = args[0].to_i
338
- if count < 1 || count > 100
339
- # sancheck. 100 is kinda arbitrary.
340
- next "Invalid count: '#{args[0]}'. Must be an integer in [1,100)."
338
+ if count < 1 || count > 1000
339
+ # sancheck. 1000 is kinda arbitrary.
340
+ next "Invalid count: '#{args[0]}'. Must be an integer in [1,1000)."
341
341
  end
342
342
 
343
343
  Einhorn::Command.set_workers(count)
@@ -1,3 +1,3 @@
1
1
  module Einhorn
2
- VERSION = '0.7.1'
2
+ VERSION = '0.7.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: einhorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Brockman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-27 00:00:00.000000000 Z
11
+ date: 2016-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake