psa pls don't use transactions for single doc unobserved atomic updates

2014-09-21 Thread Kapil Thangavelu
Its sort of misses the point on why we're doing client side transactions. Mongodb has builtin atomic operations on an individual document. We use client side txns (multiple order of magnitude slower) for multi-document txns *and/or* things we want to observe for watches. -k -- Juju-dev mailing

Re: psa pls don't use transactions for single doc unobserved atomic updates

2014-09-21 Thread David Cheney
Hi Kapil, I'm sure that the 'put everything in a transaction' pattern is applied unilaterally. Do you have some specific operations in mind ? Dave On Mon, Sep 22, 2014 at 7:46 AM, Kapil Thangavelu kapil.thangav...@canonical.com wrote: Its sort of misses the point on why we're doing client

Re: psa pls don't use transactions for single doc unobserved atomic updates

2014-09-21 Thread Tim Penhey
There is one that I talked with Kapil about this morning. When a user connects over the client api, we record the last login time. Currently this uses a transaction, but doesn't need to. In fact using a transaction here takes an order of magnitude longer, and wakes up watchers when it doesn't

Re: psa pls don't use transactions for single doc unobserved atomic updates

2014-09-21 Thread John Meinel
On Mon, Sep 22, 2014 at 3:00 AM, Tim Penhey tim.pen...@canonical.com wrote: There is one that I talked with Kapil about this morning. When a user connects over the client api, we record the last login time. Currently this uses a transaction, but doesn't need to. In fact using a transaction