Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(168)

Issue 7947043: Handle possible race conditions in SetAnnotations

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by frankban
Modified:
11 years, 1 month ago
Reviewers:
mp+154742, fwereade, rog
Visibility:
Public.

Description

Handle possible race conditions in SetAnnotations Updated annotator.SetAnnotations: Perform two attempts to update annotations so that possible DocMissing/DocExists transaction errors can be gracefully handled. https://code.launchpad.net/~frankban/juju-core/bug-1156714-retry-set-annotations/+merge/154742 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : Handle possible race conditions in SetAnnotations #

Total comments: 12

Patch Set 3 : Handle possible race conditions in SetAnnotations #

Total comments: 4

Patch Set 4 : Handle possible race conditions in SetAnnotations #

Total comments: 6

Patch Set 5 : Handle possible race conditions in SetAnnotations #

Total comments: 5

Patch Set 6 : Handle possible race conditions in SetAnnotations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -48 lines) Patch
A [revision details] View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M state/annotator.go View 1 2 3 4 5 3 chunks +68 lines, -46 lines 0 comments Download
M state/annotator_test.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M state/apiserver/api_test.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M state/state.go View 1 2 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
M state/state_test.go View 1 2 3 4 5 1 chunk +52 lines, -0 lines 0 comments Download

Messages

Total messages: 15
frankban
Please take a look.
11 years, 1 month ago (2013-03-21 15:57:21 UTC) #1
rog
LGTM with a suggestion for a comment below. nice. i wish we had a decent ...
11 years, 1 month ago (2013-03-21 16:28:59 UTC) #2
frankban
Please take a look. https://codereview.appspot.com/7947043/diff/1/state/annotator.go File state/annotator.go (right): https://codereview.appspot.com/7947043/diff/1/state/annotator.go#newcode48 state/annotator.go:48: // Perform two attempts to ...
11 years, 1 month ago (2013-03-21 16:36:42 UTC) #3
fwereade
Good direction; a few comments follow. Rog, this too has bothered me. It crosses my ...
11 years, 1 month ago (2013-03-21 23:40:17 UTC) #4
frankban
Please take a look. https://codereview.appspot.com/7947043/diff/5001/state/annotator.go File state/annotator.go (right): https://codereview.appspot.com/7947043/diff/5001/state/annotator.go#newcode59 state/annotator.go:59: } On 2013/03/21 23:40:17, fwereade ...
11 years, 1 month ago (2013-03-22 11:30:23 UTC) #5
rog
> Rog, this too has bothered me. It crosses my mind that the fuzzing built ...
11 years, 1 month ago (2013-03-22 11:43:38 UTC) #6
fwereade
On 2013/03/22 11:43:38, rog wrote: > > Rog, this too has bothered me. It crosses ...
11 years, 1 month ago (2013-03-23 14:25:44 UTC) #7
fwereade
LGTM assuming you eliminate the extra roundtrip I entrapped you into before, either as I ...
11 years, 1 month ago (2013-03-23 15:39:21 UTC) #8
rog
On 23 March 2013 14:25, <fwereade@gmail.com> wrote: > Cool -- ISTM that we probably could ...
11 years, 1 month ago (2013-03-24 12:13:22 UTC) #9
frankban
Please take a look. https://codereview.appspot.com/7947043/diff/10001/state/annotator.go File state/annotator.go (right): https://codereview.appspot.com/7947043/diff/10001/state/annotator.go#newcode66 state/annotator.go:66: if count, err := a.st.annotations.FindId(a.globalKey).Count(); ...
11 years, 1 month ago (2013-03-25 09:26:49 UTC) #10
fwereade
LGTM, just vague thoughts https://codereview.appspot.com/7947043/diff/19001/state/annotator.go File state/annotator.go (right): https://codereview.appspot.com/7947043/diff/19001/state/annotator.go#newcode74 state/annotator.go:74: return fmt.Errorf("cannot update annotations on ...
11 years, 1 month ago (2013-03-25 14:02:45 UTC) #11
frankban
Please take a look. https://codereview.appspot.com/7947043/diff/19001/state/annotator.go File state/annotator.go (right): https://codereview.appspot.com/7947043/diff/19001/state/annotator.go#newcode74 state/annotator.go:74: return fmt.Errorf("cannot update annotations on ...
11 years, 1 month ago (2013-03-25 15:36:56 UTC) #12
fwereade
Thanks very much. LGTM. https://codereview.appspot.com/7947043/diff/24001/state/annotator.go File state/annotator.go (right): https://codereview.appspot.com/7947043/diff/24001/state/annotator.go#newcode100 state/annotator.go:100: }, I might suggest similar ...
11 years, 1 month ago (2013-03-25 17:23:40 UTC) #13
rog
LGTM with one suggestion below https://codereview.appspot.com/7947043/diff/24001/state/state.go File state/state.go (right): https://codereview.appspot.com/7947043/diff/24001/state/state.go#newcode371 state/state.go:371: prefixCollMap := map[string]string{ rather ...
11 years, 1 month ago (2013-03-26 11:48:40 UTC) #14
frankban
11 years, 1 month ago (2013-03-26 16:01:31 UTC) #15
*** Submitted:

Handle possible race conditions in SetAnnotations

Updated annotator.SetAnnotations: Perform two attempts 
to update annotations so that possible DocMissing/DocExists
transaction errors can be gracefully handled.

R=rog, fwereade
CC=
https://codereview.appspot.com/7947043

https://codereview.appspot.com/7947043/diff/24001/state/annotator.go
File state/annotator.go (right):

https://codereview.appspot.com/7947043/diff/24001/state/annotator.go#newcode100
state/annotator.go:100: },
On 2013/03/25 17:23:41, fwereade wrote:
> I might suggest similar smooshing here, sorry I missed that.

Done.

https://codereview.appspot.com/7947043/diff/24001/state/state_test.go
File state/state_test.go (right):

https://codereview.appspot.com/7947043/diff/24001/state/state_test.go#newcode...
state/state_test.go:1500: // Parse a service entity name.
On 2013/03/26 11:48:41, rog wrote:
> a blank line before each section would help the eye, i think.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b