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

Issue 5699093: zookeeper: make Conn.Close safe to call concurrently with other operations.

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by rog
Modified:
9 years, 10 months ago
Reviewers:
mp+94812
Visibility:
Public.

Description

I am concerned at how complex the test for this is, relative to the simplicity of the actual code change. (and it's also potentially fragile on a heavily loaded machine). That said, I can't think of another way to test the operations directly, so I'm leaving it in. Better suggestions welcome. https://code.launchpad.net/~rogpeppe/gozk/safe-close/+merge/94812 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : zookeeper: make Conn.Close safe to call concurrently with other operations. #

Total comments: 2

Patch Set 3 : zookeeper: make Conn.Close safe to call concurrently with other operations. #

Patch Set 4 : zookeeper: make Conn.Close safe to call concurrently with other operations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -13 lines) Patch
A close_test.go View 1 2 1 chunk +220 lines, -0 lines 0 comments Download
M retry_test.go View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M suite_test.go View 1 2 4 chunks +4 lines, -3 lines 0 comments Download
M zk.go View 1 2 14 chunks +68 lines, -1 line 0 comments Download
M zk_test.go View 1 2 6 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 7
rog
Please take a look.
9 years, 11 months ago (2012-02-27 17:48:21 UTC) #1
niemeyer
https://codereview.appspot.com/5699093/diff/1001/close_test.go File close_test.go (right): https://codereview.appspot.com/5699093/diff/1001/close_test.go#newcode96 close_test.go:96: time.Sleep(0.05e9) How can you tell this is really unblocking ...
9 years, 11 months ago (2012-02-27 18:03:17 UTC) #2
rog
Please take a look.
9 years, 11 months ago (2012-02-28 09:14:40 UTC) #3
fwereade
This essentially LGTM; I don't think that it's a serious problem that the tests can ...
9 years, 10 months ago (2012-03-08 14:10:51 UTC) #4
niemeyer
LGTM, sorry for the delay.
9 years, 10 months ago (2012-03-08 17:23:48 UTC) #5
rog
i forgot to publish this comment. https://codereview.appspot.com/5699093/diff/1001/close_test.go File close_test.go (right): https://codereview.appspot.com/5699093/diff/1001/close_test.go#newcode96 close_test.go:96: time.Sleep(0.05e9) On 2012/02/27 ...
9 years, 10 months ago (2012-03-08 17:26:38 UTC) #6
rog
9 years, 10 months ago (2012-03-08 17:30:55 UTC) #7
*** Submitted:

zookeeper: make Conn.Close safe to call concurrently with other operations.

I am concerned at how complex the test for this is,
relative to the simplicity of the actual code change.
(and it's also potentially fragile on a heavily loaded machine).
That said, I can't think of another way to test the
operations directly, so I'm leaving it in.
Better suggestions welcome.

R=niemeyer, fwereade
CC=
https://codereview.appspot.com/5699093
Sign in to reply to this message.

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