geokit / geokit-rails

Official Geokit plugin for Rails/ActiveRecord. Provides location-based goodness for your Rails app. Requires the Geokit gem.
MIT License
1.57k stars 245 forks source link

geokit_least reset causes functionality gap in multi-homed apps #106

Open kwerle opened 8 years ago

kwerle commented 8 years ago

For SQL Server at least: Every app instance that uses goekit drops and removes the geokit_least function. That means that if multiple [instances of the same] apps fire up, then the geokit_least function can get dropped and not exist while another instance is trying to use that function.

This is true at least on SQL Server.

I'm not sure if this is an issue on other databases. I don't know if it's possible to put the drop/add in a transaction so that it all happens at once. I don't know if transaction locking like that would keep another connection from erring if it tried to use the function around the same time.