eugenio wrote:
> On Nov 8, 6:50�pm, Marnen Laibow-Koser <rails-mailing-l...@andreas-
> s.net> wrote:
>> This would be a single DB connection, so it seems like a good candidate
>> for a transaction. �What's the problem with doing that?
> i think that multiple requests use multiple db connections, didn't
> they?  

Of course.  But you shouldn't need a transaction over multiple requests; 
just encapsulating the INSERT and counter increment in a transaction, 
within a single request cycle, should do the trick.

> This is obviously true having two database server in a multi-
> master configuration.

Well, that's just asking for trouble. :)

> I think that Frederick Cheung's solution should
> solve the problem anyway.
> thank you.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to