1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Revert "Adds configuration option to set max_fast_inline (#2406)"

This reverts commit e8b9998ba8.
This commit is contained in:
Nate Berkopec 2020-10-25 16:18:27 -06:00
parent 94cdefce70
commit e48d6f3cae
No known key found for this signature in database
GPG key ID: BDD7A4B8E43906A6
6 changed files with 3 additions and 22 deletions

View file

@ -2,7 +2,6 @@
* Features
* Your feature goes here <Most recent on the top, like GitHub> (#Github Number)
* Adds max_fast_inline as a configuration option for the Server object (#2406)
* Bugfixes
* Add Client#io_ok?, check before Reactor#register (#2432)

View file

@ -198,8 +198,7 @@ module Puma
:logger => STDOUT,
:persistent_timeout => Const::PERSISTENT_TIMEOUT,
:first_data_timeout => Const::FIRST_DATA_TIMEOUT,
:raise_exception_on_sigterm => true,
:max_fast_inline => Const::MAX_FAST_INLINE
:raise_exception_on_sigterm => true
}
end

View file

@ -810,12 +810,5 @@ module Puma
def nakayoshi_fork(enabled=true)
@options[:nakayoshi_fork] = enabled
end
# The number of requests to attempt inline before sending a client back to
# the reactor to be subject to normal ordering.
#
def max_fast_inline(num_of_requests)
@options[:max_fast_inline] = Float(num_of_requests)
end
end
end

View file

@ -90,7 +90,6 @@ module Puma
@max_threads = options.fetch :max_threads , (Puma.mri? ? 5 : 16)
@persistent_timeout = options.fetch :persistent_timeout, PERSISTENT_TIMEOUT
@queue_requests = options.fetch :queue_requests, true
@max_fast_inline = options.fetch :max_fast_inline, MAX_FAST_INLINE
temp = !!(@options[:environment] =~ /\A(development|test)\z/)
@leak_stack_on_error = @options[:environment] ? temp : true
@ -443,11 +442,11 @@ module Puma
check_for_more_data = @status == :run
if requests >= @max_fast_inline
if requests >= MAX_FAST_INLINE
# This will mean that reset will only try to use the data it already
# has buffered and won't try to read more data. What this means is that
# every client, independent of their request speed, gets treated like a slow
# one once every max_fast_inline requests.
# one once every MAX_FAST_INLINE requests.
check_for_more_data = false
end

View file

@ -1 +0,0 @@
max_fast_inline Float::INFINITY

View file

@ -204,14 +204,6 @@ class TestConfigFile < TestConfigFileBase
assert_equal 150, conf.options[:worker_shutdown_timeout]
end
def test_config_files_with_float_convert
conf = Puma::Configuration.new(config_files: ['test/config/with_float_convert.rb']) do
end
conf.load
assert_equal Float::INFINITY, conf.options[:max_fast_inline]
end
def test_config_raise_exception_on_sigterm
conf = Puma::Configuration.new do |c|
c.raise_exception_on_sigterm false