-
Jean Boussier authored
Many places in Active Support and Rails in general use `Thread.current#[]` to store "request (or job) local data". This often cause problems with `Enumerator` because it runs in a different fiber. On the other hand, some places migrated to `Thread#thread_variable_get` which cause issues with fiber based servers (`falcon`). Based on this, I believe the isolation level should be an application configuration. For backward compatibility it could ship with `:fiber` isolation as a default but longer term :thread would make more sense as it would work fine for all deployment targets except falcon. Ref: https://github.com/rails/rails/pull/38905 Ref: https://github.com/rails/rails/pull/39428 Ref: https://github.com/rails/rails/pull/34495 (and possibly many others)
Jean Boussier authoredMany places in Active Support and Rails in general use `Thread.current#[]` to store "request (or job) local data". This often cause problems with `Enumerator` because it runs in a different fiber. On the other hand, some places migrated to `Thread#thread_variable_get` which cause issues with fiber based servers (`falcon`). Based on this, I believe the isolation level should be an application configuration. For backward compatibility it could ship with `:fiber` isolation as a default but longer term :thread would make more sense as it would work fine for all deployment targets except falcon. Ref: https://github.com/rails/rails/pull/38905 Ref: https://github.com/rails/rails/pull/39428 Ref: https://github.com/rails/rails/pull/34495 (and possibly many others)
Loading