You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a Rails 7 app with load_async enabled (config.active_record.async_query_executor = :global_thread_pool). Switch into a tenant schema. Use load_async to load an AR relation.
Expected behavior
Whether the query is invoked async or sync, the records returned should be from the tenant schema.
Actual behavior
The records returned when the query is invoked async are from the public schema.
Steps to reproduce
Create a Rails 7 app with load_async enabled (
config.active_record.async_query_executor = :global_thread_pool
). Switch into a tenant schema. Useload_async
to load an AR relation.Expected behavior
Whether the query is invoked async or sync, the records returned should be from the tenant schema.
Actual behavior
The records returned when the query is invoked async are from the public schema.
System configuration
Database: Postgres 13
Apartment version: 7d7c73c
Apartment config (in
config/initializers/apartment.rb
or so):use_schemas
: default, sotrue
Rails (or ActiveRecord) version: 7.0.2.3
Ruby version: 3.1.1
The text was updated successfully, but these errors were encountered: