Skip to content
Commits on Feb 1, 2016
  1. @jeremy

    Merge pull request #23407 from jeremy/corrupt-before-commit

    jeremy committed
    Fix corrupt transaction state caused by `before_commit` exceptions
  2. @jeremy

    Fix corrupt transaction state caused by `before_commit` exceptions

    jeremy committed
    When a `before_commit` callback raises, the database is rolled back but
    AR's record of the current transaction is not, leaving the connection in
    a perpetually broken state that affects all future users of the
    connection: subsequent requests, jobs, etc. They'll think a transaction
    is active when none is, so they won't BEGIN on their own. This manifests
    as missing `after_commit` callbacks and broken ROLLBACKs.
    
    This happens because `before_commit` callbacks fire before the current
    transaction is popped from the stack, but the exception-handling path
    they hit assumes that the current transaction was already popped. So the
    database ROLLBACK is issued, but the transaction stack is left intact.
    
    Common cause: deadlocked `#touch`, which is now implemented with
    `before_commit` callbacks.
    
    What's next:
    * We shouldn't allow active transaction state when checking in or out
      from the connection pool. Verify that conns are clean.
    * Closer review of txn manager sad paths. Are we missing other spots
      where we'd end up with incorrect txn state? What's the worst that can
      happen if txn state drifts? How can we guarantee it doesn't and
      contain the fallout if it does?
    
    Thanks for @tomafro for expert diagnosis!
Commits on Dec 18, 2015
  1. @jeremy
Commits on Dec 15, 2015
  1. @jeremy

    Merge pull request #22562 from sblackstone/master

    jeremy committed
    Allow users to pass flags from database.yml
Commits on Dec 10, 2015
  1. @jeremy

    Merge pull request #22552 from tamird/nokogiri-1.6.7

    jeremy committed
    Update nokogiri to 1.6.7
Commits on Nov 4, 2015
  1. @jeremy

    Merge pull request #113 from dballona/fix-subscription-callbacks

    jeremy committed
    Fixing subscription callbacks
Commits on Nov 3, 2015
  1. @jeremy

    Merge pull request #18774 from yuki24/deprecate-original-exception-in…

    jeremy committed
    …favor-of-cause
    
    Deprecate exception#original_exception in favor of exception#cause
Commits on Oct 16, 2015
  1. @jeremy
  2. @jeremy

    Merge branch 'adjust-reconnect'

    jeremy committed
  3. @jeremy

    Merge pull request #97 from lsylvester/speed-up-tests

    jeremy committed
    Speed up tests be calling EM.run_deferred_callbacks instead of setting a timer
  4. @jeremy

    Devolve blanket #require to reveal intent and responsibility

    jeremy committed
    * Move specific requires close to where they're needed.
    * Use the private active_support/rails dep to wrap up common needs
      like eager autoload and module delegation.
    * Use a single Rails engine rather than an engine and a railtie.
    * Prefer `AS::JSON.encode` to `Object#to_json`.
  5. @jeremy

    Test against Rails edge by default. CI against 4.2 also.

    jeremy committed
    * Don't deep-require to AD::Http::Request since it misses Mime autoload
  6. @jeremy
  7. @jeremy
  8. @jeremy
  9. @jeremy
Commits on Oct 13, 2015
  1. @jeremy

    Merge pull request #19135 from yuki24/access-control-support

    jeremy committed
    Add basic support for access control headers to ActionDispatch::Static
Commits on Oct 12, 2015
  1. @jeremy

    Merge pull request #21936 from y-yagi/do_not_generate_manifest_in_plu…

    jeremy committed
    …gins
    
    do not generate manifest.js in plugins
Commits on Oct 10, 2015
  1. @jeremy

    Merge pull request #11410 from bogdan/increment-concurency

    jeremy committed
    Make AR#increment! and #decrement! concurrency-safe
Commits on Oct 9, 2015
  1. @jeremy

    Merge pull request #21631 from RobinClowers/fix-cache-instrumentation

    jeremy committed
    Fix cache fetch instrumentation
Commits on Oct 6, 2015
  1. @jeremy

    Merge pull request #21869 from jeremy/mime-constant-deprecation

    jeremy committed
    Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compat
  2. @jeremy

    Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compat

    jeremy committed
    Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries
    that support multiple Rails versions would've had to feature-detect
    whether to use `Mime::Type[:FOO]` or `Mime::FOO`.
    
    `Mime[:foo]` has been around for ages to look up registered MIME types
    by symbol / extension, though, so libraries and plugins can safely
    switch to that without breaking backward- or forward-compatibility.
    
    Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup
    by type or extension, so it's not available as `Mime[:all]`. We use it
    internally as a wildcard for `respond_to` negotiation. If you use this
    internal constant, continue to reference it with `Mime::ALL`.
    
    Ref. efc6dd5
Commits on Oct 4, 2015
  1. @jeremy

    Merge pull request #21861 from jeremy/rack-add-header

    jeremy committed
    Introduce `Headers#add`. Move `Response#add_header` upstream.
  2. @jeremy

    Introduce `Headers#add`. Move `Response#add_header` upstream.

    jeremy committed
    * Introduce `ActionDispatch::Http::Headers#add` to add a value to
      a multivalued header.
    * Move `Response#add_header` upstream: rack/rack#957
    * Match upstream `Response#have_header?` -> `#has_header?` name change.
  3. @jeremy

    Missed Gemfile change in f849cfe

    jeremy committed
  4. @jeremy

    YAGNI concurrent-ruby master branch now that 1.0.0.pre3 is released w…

    jeremy committed
    …ith fixes for warnings and circular require
Commits on Oct 2, 2015
  1. @jeremy

    Merge pull request #21838 from jeremy/response-add-header

    jeremy committed
    Response#add_header for adding to multi-valued headers like Vary
  2. @jeremy
  3. @jeremy

    Merge pull request #21836 from jeremy/no-nil-set-cookie-headers

    jeremy committed
    Don't set a nil Set-Cookie header when there aren't any cookies
  4. @jeremy
Commits on Sep 29, 2015
  1. @jeremy
  2. @jeremy

    Merge pull request #21794 from jeremy/sprockets/move-asset-manifest-f…

    jeremy committed
    …rom-toplevel-to-config-subdir
    
    Eliminate overlapping `app/assets` load path
  3. @jeremy

    Eliminate overlapping `app/assets` load path

    jeremy committed
    * Move `app/assets/manifest.js` to `app/assets/config/manifest.js`.
      Avoid the suggestion that you can/should deep-link `stylesheets/foo`.
    * Pull in all toplevel stylesheets and JavaScripts, not just
      `application.js` and `.css`. Demonstrate how to use `link_directory`
      with a specified `.js`/`.css` type.
    * Fix RAILS_ENV handling in assets tests.
    * Shush warnings spam from third-party libs that distract from tests.
Commits on Sep 22, 2015
  1. @jeremy

    Merge pull request #21703 from ronakjangir47/redirect_error_messages

    jeremy committed
    Added assertion for error messages for redirection to nil and params
Commits on Sep 20, 2015
  1. @jeremy

    Merge pull request #21693 from joshuapinter/patch-1

    jeremy committed
    Add title for key lengths for multiple keys.
Something went wrong with that request. Please try again.