On Tue, Nov 14, 2006 at 12:44:57PM +0100, Roger wrote:
I have a model called “Business”. Each object say @business can be
tagged by any user. When i do ferret update for this object(on adding a
new tag or editing it), there always a possibility that another user is
also tagging it. I am using the std rails pluggin for tagging
So is the indexing done properly. Or would there be any problem?
There is no transaction support of any kind in Ferret itself.
The worst thing that might happen in your example is the typical ‘lost
update’ thing - users A and B both tag the same object, and B overwrites
A’s tags with his own. Without optimistic locking this will probably
happen to your database records, depending on how acts_as_taggable does
With optimistic locking the DB call will fail, and any after_create
hooks will be skipped - if you use acts_as_ferret or do your indexing
manually in an after_create hook, it shouldn’t get called in this case.
webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66