2016/10/03分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Revert "Merge pull request #26677 from tbalthazar/26644"
ActiveSupport::TimeWithZone#localtime
メソッドで値をキャッシュする際、utc_offset
毎に値をキャッシュするようにした対応(Merge pull request #26677 from tbalthazar/26644 · rails/rails@9ce2d1bをrevertしています。
引数と合わせてlocaltime
の情報をActiveSupport::TimeWithZone#localtime
メソッドでキャッシュするのは困難(Time Zone環境変数が変わった場合に、値のキャッシュを正しく行えないもよう)な為、ActiveSupport::TimeWithZone#localtime
でキャッシュするのではなく、DateAndTime::Compatibility#to_time
でキャッシュするようにするとの事です。
Revert "Merge pull request #25880 from ryandv/fix_performance_regression_in_timewithzone_to_time"
ActiveSupport::TimeWithZone#localtime
メソッドで値をキャッシュするよう修正した対応(Merge pull request #25880 from ryandv/fix_performance_regression_in_timewithzone_to_time)をrevertしています。理由は先程のrevertと同様。
Cache to_time to improve performance when comparing
activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb
の修正です。
DateAndTime::Compatibility#to_time
でlocaltime
の情報を保持するよう修正しています。性能向上の為。
def to_time - preserve_timezone ? getlocal(utc_offset) : getlocal + if preserve_timezone + @_to_time_with_instance_offset ||= getlocal(utc_offset) + else + @_to_time_with_system_offset ||= getlocal + end end
Merge pull request #26620 from maclover7/jm-ac-pg-bug
actioncable/lib/action_cable/server/base.rb
の修正です。
Action Cableでclassのreloadを行う際に、pubsub connectionのshutdownを行うよう修正しています。
classのreloadを行った際、Active Recordではactiveなconnectionを全てclearするのですが、Action Cableではclass reload後もそのclearされたconnectionをそのまま利用しようとしてエラーになっていました。
そのため、class reload後に再度connectionの取得を行うよう、pubsub のshutdownを行うようにしたとの事です。
Shut down the worker pool - don't kill it
actioncable/lib/action_cable/server/worker.rb
の修正です。
ActionCable::Server::Worker#halt
メソッドでworker poolをkill
していたのを、shutdown
するよう修正しています。
def halt - @executor.kill + @executor.shutdown end
@executor
はConcurrent::ThreadPoolExecutor
クラスのインスンタンスなのですが、Concurrent::ThreadPoolExecutor
のドキュメント(メソッドの実装はRubyThreadPoolExecutor
)を見る限り、即時削除かどうかの違いがあるようです。
Merge pull request #26425 from prathamesh-sonpatki/fix-nil-issue
activerecord/lib/active_record/integration.rb
の修正です。
ActiveRecord::Integration#cache_key
メソッドで、引数(timestamp_names)を指定している、かつ、その指定したtimestampカラムがnilだった場合に、model name + idの値を返すよう修正しています。
Temporarily make ACa tests noiser and more predictable
.travis.yml
の修正です。
Action Cableのテストを実行する際、verbose
、及びseed
オプションを指定するよう修正しています。
seed
を固定化して一時的にテストを安定化させる為、のようです。
Show an "unmatched constraints" error for mismatching and present params
actionpack/lib/action_dispatch/journey/formatter.rb
、
actionpack/lib/action_dispatch/routing/route_set.rb
の修正です。
routesでconstraintsを使用している、かつ、constraintsにマッチしない値をpath helperメソッドを指定した場合に、エラーメッセージがmissing required keys
となっていたのを、possible unmatched constraints
になるよう修正しています。
# before resources :reports, only: [:new, :create, :show], param: :reference, reference: /\d+/ report_path(reference: "ABC123") # => ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"reports", :reference=>"ABC123"} missing required keys: [:reference] # after resources :reports, only: [:new, :create, :show], param: :reference, reference: /\d+/ report_path(reference: "ABC123") # => ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"reports", :reference=>"ABC123"}, possible unmatched constraints: [:reference]
Allow the use of listen's 3.1.x branch.
Gemfile
、railties/lib/rails/generators/rails/app/templates/Gemfile
の修正です。
rails new
した際に生成されるGemfile
及びRails本体で使用しているGemfile
で、listen
3.0系しか使えないようになっていたのを、3.1系も使用出来るよう制限を緩和しています。