Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Issue 1234493005: Add LazyMultiError. (Closed)

Created:
5 years, 5 months ago by iannucci
Modified:
5 years, 5 months ago
Reviewers:
dnj, Vadim Sh., estaab, martiniss
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/infra/infra.git@master
Target Ref:
refs/heads/master
Project:
infra
Visibility:
Public.

Description

Add LazyMultiError. This is essentially a MultiError, except that it knows how big it should get if it's ever assigned an actual error, and it only does its allocation lazily. This is useful for implementing e.g. PutMulti and other Multi-style methods. R=dnj@chromium.org, estaab@chromium.org, martiniss@chromium.org, vadimsh@chromium.org BUG= Committed: https://chromium.googlesource.com/infra/infra/+/562466310abab467e6f2a9c597902847e43fade2

Patch Set 1 #

Total comments: 2

Patch Set 2 : threadsafe #

Total comments: 1

Patch Set 3 : race tests #

Patch Set 4 : mutex #

Total comments: 2

Patch Set 5 : more lock #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -0 lines) Patch
M go/src/infra/gae/libs/gae/upstream_errors.go View 1 2 3 4 2 chunks +38 lines, -0 lines 0 comments Download
M go/src/infra/gae/libs/gae/upstream_errors_test.go View 1 2 2 chunks +77 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 21 (1 generated)
iannucci
5 years, 5 months ago (2015-07-17 01:05:59 UTC) #1
iannucci
PTAL, this one is short
5 years, 5 months ago (2015-07-17 01:07:14 UTC) #2
Vadim Sh.
https://codereview.chromium.org/1234493005/diff/1/go/src/infra/gae/libs/gae/upstream_errors.go File go/src/infra/gae/libs/gae/upstream_errors.go (right): https://codereview.chromium.org/1234493005/diff/1/go/src/infra/gae/libs/gae/upstream_errors.go#newcode131 go/src/infra/gae/libs/gae/upstream_errors.go:131: // the allocated MultiError, or nil if no error ...
5 years, 5 months ago (2015-07-17 01:09:03 UTC) #3
iannucci
https://chromiumcodereview.appspot.com/1234493005/diff/1/go/src/infra/gae/libs/gae/upstream_errors.go File go/src/infra/gae/libs/gae/upstream_errors.go (right): https://chromiumcodereview.appspot.com/1234493005/diff/1/go/src/infra/gae/libs/gae/upstream_errors.go#newcode131 go/src/infra/gae/libs/gae/upstream_errors.go:131: // the allocated MultiError, or nil if no error ...
5 years, 5 months ago (2015-07-17 01:16:54 UTC) #4
Vadim Sh.
https://codereview.chromium.org/1234493005/diff/20001/go/src/infra/gae/libs/gae/upstream_errors.go File go/src/infra/gae/libs/gae/upstream_errors.go (right): https://codereview.chromium.org/1234493005/diff/20001/go/src/infra/gae/libs/gae/upstream_errors.go#newcode150 go/src/infra/gae/libs/gae/upstream_errors.go:150: e.me[i] = err strictly speaking this needs memory barrier ...
5 years, 5 months ago (2015-07-17 01:26:28 UTC) #5
iannucci
On 2015/07/17 01:26:28, Vadim Sh. wrote: > https://codereview.chromium.org/1234493005/diff/20001/go/src/infra/gae/libs/gae/upstream_errors.go > File go/src/infra/gae/libs/gae/upstream_errors.go (right): > > https://codereview.chromium.org/1234493005/diff/20001/go/src/infra/gae/libs/gae/upstream_errors.go#newcode150 ...
5 years, 5 months ago (2015-07-17 01:30:05 UTC) #6
Vadim Sh.
On 2015/07/17 01:30:05, iannucci wrote: > On 2015/07/17 01:26:28, Vadim Sh. wrote: > > > ...
5 years, 5 months ago (2015-07-17 01:32:02 UTC) #7
Vadim Sh.
Just use lock around the whole struct, it's the surest way :) Fancier sync is ...
5 years, 5 months ago (2015-07-17 01:34:33 UTC) #8
iannucci
On 2015/07/17 01:34:33, Vadim Sh. wrote: > Just use lock around the whole struct, it's ...
5 years, 5 months ago (2015-07-17 01:57:30 UTC) #9
iannucci
On 2015/07/17 01:57:30, iannucci wrote: > On 2015/07/17 01:34:33, Vadim Sh. wrote: > > Just ...
5 years, 5 months ago (2015-07-17 01:57:45 UTC) #10
Vadim Sh.
On 2015/07/17 01:57:45, iannucci wrote: > On 2015/07/17 01:57:30, iannucci wrote: > > On 2015/07/17 ...
5 years, 5 months ago (2015-07-17 02:03:11 UTC) #11
iannucci
On 2015/07/17 01:57:45, iannucci wrote: > On 2015/07/17 01:57:30, iannucci wrote: > > On 2015/07/17 ...
5 years, 5 months ago (2015-07-17 02:05:21 UTC) #12
Vadim Sh.
lgtm
5 years, 5 months ago (2015-07-17 02:06:14 UTC) #13
iannucci
Finnneeee....
5 years, 5 months ago (2015-07-17 02:10:03 UTC) #14
iannucci
On 2015/07/17 02:10:03, iannucci wrote: > Finnneeee.... Ok, it'a mutex now.
5 years, 5 months ago (2015-07-17 02:14:30 UTC) #15
Vadim Sh.
https://codereview.chromium.org/1234493005/diff/60001/go/src/infra/gae/libs/gae/upstream_errors.go File go/src/infra/gae/libs/gae/upstream_errors.go (right): https://codereview.chromium.org/1234493005/diff/60001/go/src/infra/gae/libs/gae/upstream_errors.go#newcode157 go/src/infra/gae/libs/gae/upstream_errors.go:157: if e.me == nil { it's needed here too ...
5 years, 5 months ago (2015-07-17 02:16:46 UTC) #16
iannucci
https://chromiumcodereview.appspot.com/1234493005/diff/60001/go/src/infra/gae/libs/gae/upstream_errors.go File go/src/infra/gae/libs/gae/upstream_errors.go (right): https://chromiumcodereview.appspot.com/1234493005/diff/60001/go/src/infra/gae/libs/gae/upstream_errors.go#newcode157 go/src/infra/gae/libs/gae/upstream_errors.go:157: if e.me == nil { On 2015/07/17 02:16:46, Vadim ...
5 years, 5 months ago (2015-07-17 02:23:48 UTC) #17
Vadim Sh.
lgtm
5 years, 5 months ago (2015-07-17 02:35:17 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1234493005/80001
5 years, 5 months ago (2015-07-17 02:36:29 UTC) #20
commit-bot: I haz the power
5 years, 5 months ago (2015-07-17 02:39:16 UTC) #21
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/infra/infra/+/562466310abab467e6f2a9c597902...

Powered by Google App Engine
This is Rietveld 408576698