<bump> (and w/ more comments below)

Michael A. Schoen wrote:
<resending w/ a more enticing subject for core folks>
[EMAIL PROTECTED] wrote:
I believe clear_reloadable_connections! should be as follows:

# Clears the cache which maps classes
 def clear_reloadable_connections!
  @@active_connections.each do |name, conn|
   if conn.supports_reloading?
      conn.disconnect!
      @@active_connections.delete(name)
   end
 end
end

Agreed. I don't fully understand the intent of the reloadable bit, from
the comments on the initial checkin it seems related to a sqlite issue. I don't understand why the current code would _not_ disconnect the connection (if it doesn't support reloading), but would still delete it from the cache.

Can someone from core comment?

And agree that this seems like a blocker on 1.2.

Looking at this history of this, seems this was added to deal w/ a sqlite problem, in that sqlite requires a new connection in order to see schema changes. Presuming that's the only db that requires a new connection on every request, I'd suggest the following:

1) change #supports_reloading? to #requires_reloading? (or somesuch), make it clear that it's an issue of "requiring" a new connection (for sqlite only).

2) make the change above, such that both the cache is cleared and the connection dropped ONLY for sqlite.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to