2016/10/01分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
actioncable/CHANGELOG.md
- Buffer writes to websocket connections, to avoid blocking threads that could be doing more useful things.
- Prevent race where the client could receive and act upon a subscription confirmation before the channel's
subscribed
method completed.
Merge pull request #26646 from matthewd/cable-buffer
actioncable/lib/action_cable/connection/stream.rb
、
actioncable/lib/action_cable/connection/stream_event_loop.rb
の修正です。
websocket connectionsにデータを書き込む際に、直接socketにデータを書き込むのではなく、wrier bufferを使用するよう修正しています。書き込み処理によりスレッドがブロックされてしまうのを避ける為、との事です。
Merge pull request #26584 from Shopify/cached-query-name
Active Recordの修正です。
sqlに関するinstrumentation(sql.active_record
)で、オペレーション名(key: name)がcached queryを使用した場合、すべてCACHE
になってしまっていたのを、元々のオペレーション名(Userクラスのロードの場合User Load
等)を保持するよう修正しています。
代わりに、payloadにcached
というkeyを追加し、cached queryの場合そこにtrueが設定されるよう修正しています。
Remove dup distinct from AR query list [ci skip]
rails guideのActive Record Query Interface
の修正です。
Retrieving Objects from the Database
の項にあるメソッドのリストにdistinct
が重複してあったので、片方削除しています。
Merge pull request #26547 from palkan/fix/actioncable-confirmation-race-condition
Action Cableの修正です。
clientのsubscription処理がchannel側のsubscribe
メソッドが完了するより前に投げられた場合に、エラー(RuntimeError - Unable to find subscription with identifier
)になってしまうバグがあったのを修正しています。
Make PG deadlock error more deterministic
activerecord/test/cases/adapters/postgresql/transaction_test.rb
の修正です。
PostgreSQL deadlockに関するテストで、スレッド間の同期をとるのにsleepを使用していたのを、Concurrent::CyclicBarrier
を使用するよう修正しています。
Merge pull request #26676 from matthewd/no-faye-mode
Action Cableの修正です。
Faye(Faye: Simple pub/sub messaging for the web) support用のコード(FayeClientSocket
、FayeEventLoop
等)をまとめて削除しています。
deprecatedではなく削除なのはドキュメントにFaye modeについての説明は記載していなかった為、との事です。因みに削除したのは動作が不安定な為のようです。
Fix ActiveSupport::TimeWithZone#localtime
Merge pull request #25880 from ryandv/fix_performance_regression_in_timewithzone_to_timeで、ActiveSupport::TimeWithZone#localtime
メソッドで値をキャッシュするよう修正したのですが、その際引数のutc_offset
が変わった場合に同じ値を使ってしまっていたのを、utc_offset
毎に値を保持するよう修正しています。
def localtime(utc_offset = nil) - @localtime ||= utc.getlocal(utc_offset) + @localtime ||= {} + @localtime[utc_offset] ||= utc.getlocal(utc_offset) end
Remove obsolete comment about class-level respond_to
actionpack/lib/action_controller/metal/renderers.rb
のdocの修正です。
ActionController::Renderers.add
メソッドのdocにresponders
gemに切り出されたclass levelのrespond_to
メソッドについて言及している箇所があったのを削除しています。
activerecord/lib/active_record/migration.rb
の修正です。
不足していたzlib
のrequireを追加しています。