In rails/activerecord/lib/active_record.rb, why are some classes autoloaded while other are eager_autoloaded?
Specifically, I’m looking into an error with the message “uninitialized constant ActiveRecord::Core::ClassMethods::StatementCache Did you mean? ActiveRecord::StatementCache”. This recently showed up in my Sidekiq process logs, but happens infrequently and I haven’t been able to reproduce it. It seems like a concurrency bug with class-loading in ActiveRecord - could it happen when a process gets restarted and multiple threads are trying to load ActiveRecord classes at the same time?
Any pointers would be helpful. Thanks!