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

John Meinel john at arbash-meinel.com
Mon Sep 22 05:00:13 UTC 2014


On Mon, Sep 22, 2014 at 3:00 AM, Tim Penhey <tim.penhey at 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 here takes an order of magnitude longer, and wakes up
> watchers when it doesn't need to (because of a new transaction).
>
> This is certainly something that is worthwhile looking at, and
> determining a pattern for.
>
> Tim
>
>
I hesitate to start getting into a pattern of not using transactions
because we think we don't need one for this particular operation right now.
Because stuff that didn't used to need one will likely evolve and then not
have one when really it should.

While we could certainly do a pass, and evaluate for each thing we are
doing whether it is necessary, are we stable enough that this isn't just
premature optimization?

John
=:->
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140922/b603c521/attachment.html>


More information about the Juju-dev mailing list