juju/blobstore — pull request #15 by axw (2014-09-10 03:44:47+00:00)
Title: Don't double decref resource if pending upload

There is a problem with PutForEnvironment where
it will remove a resource if it the upload is
pending in another client. We now don't decrement
the refcount if the upload is pending, as we
already cancel out the initial increment with
the existing resource ID check/removal.

We should allow multiple clients to attempt to
upload concurrently, and choose the winner, as
suggested in #3. This is not handled here.