Evan Weaver on 24 Jan 2008 11:54:59 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] ActiveRecord: updating a single attribute

  • From: "Evan Weaver" <evan@cloudbur.st>
  • To: talk@phillyonrails.org
  • Subject: Re: [PhillyOnRails] ActiveRecord: updating a single attribute
  • Date: Thu, 24 Jan 2008 14:54:18 -0500
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=caqVjsyt4k9Mamdu5r3bh8Zn3DmOdjmiER+sxfu9vL8=; b=kkt2hM33PjHxvIlnXjmPghUzTS0iIZlSWs8BHBIrU24B0nLg4Cpto7sDRH5IRduh2l8/9r0PNE/7fmSE/RgkIEzUDZnFEXixDWWzR9fMOALjPbNIAXOVbzi59TL9HvEuUnlhc0Yjqm3sd5cnm1bv/M5tFf4/Xmcx2YjNpWq3/rY=
  • List-archive: <http://lists.phillyonrails.org/pipermail/talk>
  • Reply-to: talk@phillyonrails.org
  • Sender: talk-bounces@phillyonrails.org

> Is likely to eat data during concurrent access if you don't go around adding locking support to
> everything.

That's kind of misinformed; you can use pessimistic locking in AR if
you want. You can pick two of concurrent updates, application-side
validations, and no race losses. AR normally picks the first two.

Evan

On Jan 24, 2008 2:49 PM, Justin Reagor <justinwr@gmail.com> wrote:
>  I believe this also jives with Sequel...
>
>
> http://code.google.com/p/ruby-sequel/
>
>
> On Jan 24, 2008, at 2:43 PM, Eric Snyder wrote:
>
>
> "ActiveRecord updates every column in a row during a save whether that
>
> column changed or not. So it performs work it doesn't really need to.
>
> Which is much slower, and is likely to eat data during concurrent
>
> access if you don't go around adding locking support to everything."
>
> _______________________________________________
> To unsubscribe or change your settings, visit:
> http://lists.phillyonrails.org/mailman/listinfo/talk
>
>



-- 
Evan Weaver
Cloudburst, LLC
_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk