Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sidekiq/sidekiq
base: v5.1.1
Choose a base ref
...
head repository: sidekiq/sidekiq
compare: v5.1.2
Choose a head ref
  • 20 commits
  • 32 files changed
  • 6 contributors

Commits on Feb 13, 2018

  1. comment

    mperham committed Feb 13, 2018
    Copy the full SHA
    eca6acc View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2018

  1. Revert "Use active record cache when available"

    This reverts commit a27d692.
    
    The reason for reverting is that this middleware has no effect. In Rails
    5.0+, Sidekiq runs its jobs using the Rails reloader/executor API[1].
    
    In Rails 5.0+, however, the ActiveRecord query cache registers its own
    hooks with the executor[2], and these hooks automatically enable the
    query cache for the duration of any work the executor performs[3].
    
    As a result, the query cache is already on by default for any Sidekiq
    jobs run in Rails 5.0+, so it's not necessary to separately enable it in
    a middleware.
    
    [1] https://github.com/mperham/sidekiq/blob/eca6acc0ce201125a45a5af75fd08c6ce985df5a/lib/sidekiq/rails.rb#L33-L37
    [2] https://github.com/rails/rails/blob/f8c00c130016b248d1d409f131356632dcc418c6/activerecord/lib/active_record/railtie.rb#L159-L163
    [3] https://github.com/rails/rails/blob/f8c00c130016b248d1d409f131356632dcc418c6/activerecord/lib/active_record/query_cache.rb#L26-L41
    Simon Coffey authored and mperham committed Feb 15, 2018
    Copy the full SHA
    abca42d View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2018

  1. Remove explicit freeze, which should not be necessary anymore with fr…

    …ozen_string_literal: true. Fixes #3759
    mperham committed Feb 17, 2018
    Copy the full SHA
    7de6f4c View commit details
    Browse the repository at this point in the history
  2. Missed a few

    mperham committed Feb 17, 2018
    Copy the full SHA
    2ed9260 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2018

  1. 401

    mperham committed Feb 21, 2018
    Copy the full SHA
    ee3194d View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2018

  1. change

    mperham committed Feb 22, 2018
    Copy the full SHA
    c2a7ee7 View commit details
    Browse the repository at this point in the history
  2. Fix pro version link

    pawurb authored and mperham committed Feb 22, 2018
    Copy the full SHA
    e18d9ac View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2018

  1. Issue 3775 - Fixed Ctrl-C exception on Windows.

    Bernica authored and mperham committed Feb 26, 2018
    Copy the full SHA
    6b3e453 View commit details
    Browse the repository at this point in the history
  2. changes, bump

    mperham committed Feb 26, 2018
    Copy the full SHA
    a0bcd59 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2018

  1. Modern optimization

    mperham committed Feb 27, 2018
    Copy the full SHA
    8a4926c View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2018

  1. Copy the full SHA
    aa46700 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2018

  1. Copy the full SHA
    967f3f3 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2018

  1. fixes

    mperham committed Mar 19, 2018
    Copy the full SHA
    1aad7b5 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2018

  1. Copy the full SHA
    611f7cd View commit details
    Browse the repository at this point in the history
  2. fix: use default when returned 0

    dsalahutdinov authored and mperham committed Mar 22, 2018
    Copy the full SHA
    7448351 View commit details
    Browse the repository at this point in the history
  3. Refactor, changes

    mperham committed Mar 22, 2018
    Copy the full SHA
    86ca02f View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2018

  1. Add link to docs in footer

    mperham committed Mar 27, 2018
    Copy the full SHA
    82bdae8 View commit details
    Browse the repository at this point in the history
  2. change

    mperham committed Mar 27, 2018
    Copy the full SHA
    60a41d3 View commit details
    Browse the repository at this point in the history
  3. Use RAILS_MAX_THREADS for client pool size

    This is a follow up to #2985 (52828e4) adding similar support for the
    client connection pool. For Rails servers, Sidekiq is not loaded from
    the CLI so the prior change to support setting the concurrency via
    `RAILS_MAX_THREADS` is not applied to the web server process. This means
    for Rails servers which do not configure a custom size through an
    initializer they will run with the default connection pool size of 5.
    
    When the Rails server runs the initial Redis connection may be made
    through `Sidekiq::Client` (e.g. from [`ActiveJob::QueueAdapters::SidekiqAdapter`](https://github.com/rails/rails/blob/v5.1.5/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb#L20)).
    This causes the `redis_pool` to be initialized without any options,
    setting the pool size to the default of 5.
    
        .gem/ruby/2.5.0/gems/sidekiq-5.1.1/lib/sidekiq.rb:125:in `redis_pool'
        .gem/ruby/2.5.0/gems/sidekiq-5.1.1/lib/sidekiq/client.rb:42:in `initialize'
        .gem/ruby/2.5.0/gems/sidekiq-5.1.1/lib/sidekiq/client.rb:131:in `new'
        .gem/ruby/2.5.0/gems/sidekiq-5.1.1/lib/sidekiq/client.rb:131:in `push'
        .gem/ruby/2.5.0/gems/activejob-5.1.5/lib/active_job/queue_adapters/sidekiq_adapter.rb:20:in `enqueue'
        .gem/ruby/2.5.0/gems/activejob-5.1.5/lib/active_job/enqueuing.rb:51:in `block in enqueue'
        .gem/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
        .gem/ruby/2.5.0/gems/activejob-5.1.5/lib/active_job/logging.rb:15:in `block (3 levels) in <module:Logging>'
        .gem/ruby/2.5.0/gems/activejob-5.1.5/lib/active_job/logging.rb:44:in `block in tag_logger'
        .gem/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/tagged_logging.rb:69:in `block in tagged'
        .gem/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/tagged_logging.rb:26:in `tagged'
        .gem/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/tagged_logging.rb:69:in `tagged'
        .gem/ruby/2.5.0/gems/activejob-5.1.5/lib/active_job/logging.rb:44:in `tag_logger'
        .gem/ruby/2.5.0/gems/activejob-5.1.5/lib/active_job/logging.rb:14:in `block (2 levels) in <module:Logging>'
        .gem/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/callbacks.rb:117:in `instance_exec'
        .gem/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
        .gem/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/callbacks.rb:135:in `run_callbacks'
        .gem/ruby/2.5.0/gems/activejob-5.1.5/lib/active_job/enqueuing.rb:47:in `enqueue'
        .gem/ruby/2.5.0/gems/activejob-5.1.5/lib/active_job/enqueuing.rb:18:in `perform_later'
    
    For the majority of cases, a client pool size of 5 is sufficient.
    However, servers which utilize a high number of threads, with large job
    payloads, and which may experience some network latency issues can see
    `Timeout::Error` crashes. This may be further exacerbated by the ~2-20x
    performance decrease through `ActiveJob` (#3782). Rails addresses this
    general type of connection issue for the main database by suggesting
    that the DB pool size match the number of threads running. This change
    applies that logic to the default client pool size by leveraging the
    same environment setting; this way there's a connection available per
    thread.
    
    This may also have the side effect of a slight performance boost, as
    there is less of a chance that threads will be blocked waiting on
    connections. The trade-off is that there may be a memory profile
    increase to handle the additional Redis connections in the pool; note
    the pool only creates new connections as necessary to handle the
    requests.
    
    Resolves #3806
    cupakromer authored and mperham committed Mar 27, 2018
    Copy the full SHA
    b23c0ec View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2018

  1. release

    mperham committed Mar 29, 2018
    Copy the full SHA
    c262f76 View commit details
    Browse the repository at this point in the history