puma 2.10.1-java → 2.10.2-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puma might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e0c278f7afeeb8f9a63ee5e432dd35cda2b0ef1
4
- data.tar.gz: baf0b1049422bc1201a62f5ebbb5d38cf0a49388
3
+ metadata.gz: 198c788fc20ee4db44015ece6777e118d1abc3b4
4
+ data.tar.gz: 3d63d1b999599a1615ee7a79f68900019b58e18d
5
5
  SHA512:
6
- metadata.gz: 0d0144fdbb58e698cbd98c11c0d5845b066dec422d64438f4d8af541c72dba27783f3548dcd67569f207b0ae71207e5808a2c1bffc0db7aaeb296c42c7ae8553
7
- data.tar.gz: bc386cd64fafc83f5e02d4a151a33d96c8c45ebfc43d2249b6c85b64f6d763e05bd8325cd8e0bcc25a23f0c7d81543dff1196a30d42ee190fce098bde176c89a
6
+ metadata.gz: 50d71dab52b51e56c433aed14973f339dd78b141f11a60d15de3870d6afbeb72f82ca706d5a3a5de915f011bced5667de8d1e96bef8da215f046c8b443861893
7
+ data.tar.gz: e6ff97f2decbbc55ad6fcb7313b108cd5b8f57abb0d01270c833ea4d89038bb9f20928b13cffd48f74aa8f8c4aa9c9052127d8043938d57c259623968c15f371
@@ -1,4 +1,12 @@
1
- === 2.10.1 / 2014-11-14
1
+ === 2.10.2 / 2014-11-26
2
+
3
+ * 1 bug fix:
4
+ * Conditionalize thread local cleaning, fixes perf degradation fix
5
+ The code to clean out all Thread locals adds pretty significant
6
+ overhead to a each request, so it has to be turned on explicitly
7
+ if a user needs it.
8
+
9
+ === 2.10.1 / 2014-11-24
2
10
 
3
11
  * 1 bug fix:
4
12
  * Load the app after daemonizing because the app might start threads.
@@ -212,6 +212,13 @@ module Puma
212
212
  @options[:binds] << "tcp://#{Configuration::DefaultTCPHost}:#{port}"
213
213
  end
214
214
 
215
+ # Work around leaky apps that leave garbage in Thread locals
216
+ # across requests
217
+ #
218
+ def clean_thread_locals(which=true)
219
+ @options[:clean_thread_locals] = which
220
+ end
221
+
215
222
  # Daemonize the server into the background. Highly suggest that
216
223
  # this be combined with +pidfile+ and +stdout_redirect+.
217
224
  def daemonize(which=true)
@@ -28,7 +28,7 @@ module Puma
28
28
  # too taxing on performance.
29
29
  module Const
30
30
 
31
- PUMA_VERSION = VERSION = "2.10.1".freeze
31
+ PUMA_VERSION = VERSION = "2.10.2".freeze
32
32
  CODE_NAME = "Robots on Comets".freeze
33
33
 
34
34
  FAST_TRACK_KA_TIMEOUT = 0.2
Binary file
@@ -259,6 +259,8 @@ module Puma
259
259
  end
260
260
  end
261
261
 
262
+ @thread_pool.clean_thread_locals = @options[:clean_thread_locals]
263
+
262
264
  @reactor = Reactor.new self, @thread_pool
263
265
 
264
266
  @reactor.run_in_thread
@@ -36,9 +36,12 @@ module Puma
36
36
  @mutex.synchronize do
37
37
  @min.times { spawn_thread }
38
38
  end
39
+
40
+ @clean_thread_locals = false
39
41
  end
40
42
 
41
43
  attr_reader :spawned, :trim_requested
44
+ attr_accessor :clean_thread_locals
42
45
 
43
46
  # How many objects have yet to be processed by the pool?
44
47
  #
@@ -89,8 +92,10 @@ module Puma
89
92
 
90
93
  break unless continue
91
94
 
92
- Thread.current.keys.each do |key|
93
- Thread.current[key] = nil unless key == :__recursive_key__
95
+ if @clean_thread_locals
96
+ Thread.current.keys.each do |key|
97
+ Thread.current[key] = nil unless key == :__recursive_key__
98
+ end
94
99
  end
95
100
 
96
101
  block.call(work, *extra)
@@ -167,6 +167,8 @@ class TestThreadPool < Test::Unit::TestCase
167
167
  Thread.pass until finished
168
168
  }
169
169
 
170
+ pool.clean_thread_locals = true
171
+
170
172
  n.times { pool << 1 }
171
173
 
172
174
  finished = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.1
4
+ version: 2.10.2
5
5
  platform: java
6
6
  authors:
7
7
  - Evan Phoenix
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-24 00:00:00.000000000 Z
11
+ date: 2014-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement