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

Issue 6782140: code review 6782140: log/syslog: retry once if write fails (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by jeff.allen
Modified:
11 years, 2 months ago
Reviewers:
CC:
mikio, rsc, bradfitz, golang-dev
Visibility:
Public.

Description

log/syslog: retry once if write fails Implements deferred connections + single-attempt automatic retry. Based on CL 5078042 from kuroneko. Fixes issue 2264.

Patch Set 1 #

Patch Set 2 : diff -r 697f36fec52c https://code.google.com/p/go #

Patch Set 3 : diff -r 697f36fec52c https://code.google.com/p/go #

Patch Set 4 : diff -r 697f36fec52c https://code.google.com/p/go #

Total comments: 4

Patch Set 5 : diff -r 025b9d070a85 https://code.google.com/p/go #

Patch Set 6 : diff -r 6e0e4077f488 https://code.google.com/p/go #

Patch Set 7 : diff -r 52c9c412f1f2 https://code.google.com/p/go #

Total comments: 1

Patch Set 8 : diff -r a5efcd1675eb https://code.google.com/p/go #

Total comments: 11

Patch Set 9 : diff -r a5efcd1675eb https://code.google.com/p/go #

Patch Set 10 : diff -r 477b2e70b12d https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 11 : diff -r 3fe40a41018d https://code.google.com/p/go #

Total comments: 13

Patch Set 12 : diff -r ee5afd4b14b7 https://code.google.com/p/go #

Total comments: 8

Patch Set 13 : diff -r 3684de5292bf https://code.google.com/p/go #

Patch Set 14 : diff -r 1399878c6731 https://code.google.com/p/go #

Patch Set 15 : diff -r f6172d444cc0 http://code.google.com/p/go #

Total comments: 5

Patch Set 16 : diff -r 9ff35ff05de6 http://code.google.com/p/go #

Total comments: 8

Patch Set 17 : diff -r 8d4bd93dcd41 http://code.google.com/p/go #

Total comments: 9

Patch Set 18 : diff -r a9211b512258 http://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+306 lines, -89 lines) Patch
M src/pkg/log/syslog/syslog.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +93 lines, -49 lines 0 comments Download
M src/pkg/log/syslog/syslog_test.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +210 lines, -35 lines 0 comments Download
M src/pkg/log/syslog/syslog_unix.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -5 lines 0 comments Download

Messages

Total messages: 38
jeff.allen
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
11 years, 4 months ago (2012-11-30 11:18:37 UTC) #1
mikio
thank you for tackling this. https://codereview.appspot.com/6782140/diff/6001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): https://codereview.appspot.com/6782140/diff/6001/src/pkg/log/syslog/syslog.go#newcode1 src/pkg/log/syslog/syslog.go:1: // Copyright 2012 The ...
11 years, 4 months ago (2012-12-01 13:16:15 UTC) #2
jeff.allen
OK, I think I understand the problem. log/syslog is allowed to use L4, OS and ...
11 years, 4 months ago (2012-12-01 20:18:56 UTC) #3
jeff.allen
Please take a look. This is what it would look like fi we did this ...
11 years, 4 months ago (2012-12-05 15:44:55 UTC) #4
rsc
Please don't edit the copyright notices: we don't bother updating the year. I agree with ...
11 years, 4 months ago (2012-12-06 06:22:38 UTC) #5
mikio
Hi, I don't see any reason we should tweak net package here. func (w *Writer) ...
11 years, 4 months ago (2012-12-06 06:59:59 UTC) #6
jeff.allen
Hello golang-dev@googlegroups.com, mikioh.mikioh@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-12-06 09:40:09 UTC) #7
mikio
If you want to make a conn of Writer mutable then you need to prevent ...
11 years, 4 months ago (2012-12-07 02:57:51 UTC) #8
jeff.allen
Thanks, I totally forgot about that comment from before. I included your test and the ...
11 years, 4 months ago (2012-12-07 10:25:25 UTC) #9
dvyukov
Keep deracing!
11 years, 4 months ago (2012-12-07 10:37:30 UTC) #10
mikio
On Fri, Dec 7, 2012 at 7:37 PM, <dvyukov@google.com> wrote: > Keep deracing! Great work, ...
11 years, 4 months ago (2012-12-07 11:50:55 UTC) #11
mikio
I had a quick look ti syslog.go, not enough to tests. Also you don't need ...
11 years, 4 months ago (2012-12-07 11:53:25 UTC) #12
jeff.allen
Hello golang-dev@googlegroups.com, mikioh.mikioh@gmail.com, rsc@golang.org, dvyukov@google.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-12-07 15:29:22 UTC) #13
jeff.allen
http://codereview.appspot.com/6782140/diff/27001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): http://codereview.appspot.com/6782140/diff/27001/src/pkg/log/syslog/syslog.go#newcode119 src/pkg/log/syslog/syslog.go:119: return &Writer{priority: priority, tag: tag, hostname: hostname, conn: nil, ...
11 years, 4 months ago (2012-12-07 20:38:20 UTC) #14
mikio
https://codereview.appspot.com/6782140/diff/34001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): https://codereview.appspot.com/6782140/diff/34001/src/pkg/log/syslog/syslog.go#newcode88 src/pkg/log/syslog/syslog.go:88: type serverConn interface { serverConn? I'm confused a bit. ...
11 years, 4 months ago (2012-12-08 02:18:52 UTC) #15
mikio
https://codereview.appspot.com/6782140/diff/27001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): https://codereview.appspot.com/6782140/diff/27001/src/pkg/log/syslog/syslog.go#newcode119 src/pkg/log/syslog/syslog.go:119: return &Writer{priority: priority, tag: tag, hostname: hostname, conn: nil, ...
11 years, 4 months ago (2012-12-08 03:00:19 UTC) #16
rsc
https://codereview.appspot.com/6782140/diff/20001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): https://codereview.appspot.com/6782140/diff/20001/src/pkg/log/syslog/syslog.go#newcode117 src/pkg/log/syslog/syslog.go:117: return &Writer{priority: priority, tag: tag, hostname: hostname, conn: nil, ...
11 years, 4 months ago (2012-12-11 15:38:36 UTC) #17
jeff.allen
Hello mikioh.mikioh@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-12-13 08:26:48 UTC) #18
bradfitz
https://codereview.appspot.com/6782140/diff/38001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): https://codereview.appspot.com/6782140/diff/38001/src/pkg/log/syslog/syslog.go#newcode82 src/pkg/log/syslog/syslog.go:82: mu sync.Mutex either put a space before this line ...
11 years, 4 months ago (2012-12-13 20:32:36 UTC) #19
jeff.allen
Hello mikioh.mikioh@gmail.com, rsc@golang.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-12-14 09:08:20 UTC) #20
bradfitz
LGTM On Fri, Dec 14, 2012 at 1:08 AM, <jeff.allen@gmail.com> wrote: > Hello mikioh.mikioh@gmail.com, rsc@golang.org, ...
11 years, 4 months ago (2012-12-14 17:02:09 UTC) #21
bradfitz
Leaving for Mikioh to also review and then submit. On Fri, Dec 14, 2012 at ...
11 years, 4 months ago (2012-12-14 17:11:20 UTC) #22
mikio
Please revisit test cases because I've just modified ListenUnixgram signature. Also please provide multiple fake ...
11 years, 4 months ago (2012-12-16 06:54:17 UTC) #23
jeff.allen
Most comments have been addressed. Still need to do the concurrent reconnect test. https://codereview.appspot.com/6782140/diff/38001/src/pkg/log/syslog/syslog.go File ...
11 years, 4 months ago (2012-12-18 15:18:02 UTC) #24
mikio
> I think the correct approach to this risk is to reduce the number of ...
11 years, 4 months ago (2012-12-19 00:30:55 UTC) #25
jeff.allen
On 2012/12/19 00:30:55, mikio wrote: > for example, your CL allows to revive a closed ...
11 years, 4 months ago (2012-12-19 09:06:36 UTC) #26
jeff.allen
Please take another look. The concurrent test is done now, and the mystery about Read ...
11 years, 3 months ago (2013-01-09 12:55:00 UTC) #27
jeff.allen
This CL has just been updated to work with tip of tree. Please check it ...
11 years, 2 months ago (2013-01-30 12:43:43 UTC) #28
bradfitz
https://codereview.appspot.com/6782140/diff/55001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): https://codereview.appspot.com/6782140/diff/55001/src/pkg/log/syslog/syslog.go#newcode127 src/pkg/log/syslog/syslog.go:127: // (*Writer).connect makes a connection to the syslog server. ...
11 years, 2 months ago (2013-01-30 17:20:01 UTC) #29
rsc
https://codereview.appspot.com/6782140/diff/55001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): https://codereview.appspot.com/6782140/diff/55001/src/pkg/log/syslog/syslog.go#newcode119 src/pkg/log/syslog/syslog.go:119: // w.mu not held, but w is still private ...
11 years, 2 months ago (2013-01-30 17:35:15 UTC) #30
jeff.allen
Something has to be done about embedded newlines, because they are the record separator for ...
11 years, 2 months ago (2013-01-31 10:34:32 UTC) #31
jeff.allen
Hello mikioh.mikioh@gmail.com, rsc@golang.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 2 months ago (2013-01-31 10:35:16 UTC) #32
rsc
Seems fine, leaving for Brad and Mikio. We can have a discussion about newlines in ...
11 years, 2 months ago (2013-01-31 15:44:00 UTC) #33
jeff.allen
Hello mikioh.mikioh@gmail.com, rsc@golang.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 2 months ago (2013-02-01 09:27:11 UTC) #34
bradfitz
https://codereview.appspot.com/6782140/diff/68001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): https://codereview.appspot.com/6782140/diff/68001/src/pkg/log/syslog/syslog.go#newcode11 src/pkg/log/syslog/syslog.go:11: // A failing write will cause the package to ...
11 years, 2 months ago (2013-02-01 17:08:10 UTC) #35
jeff.allen
brad, PTAL. https://codereview.appspot.com/6782140/diff/68001/src/pkg/log/syslog/syslog.go File src/pkg/log/syslog/syslog.go (right): https://codereview.appspot.com/6782140/diff/68001/src/pkg/log/syslog/syslog.go#newcode166 src/pkg/log/syslog/syslog.go:166: func (w *Writer) Close() error { It ...
11 years, 2 months ago (2013-02-05 16:08:47 UTC) #36
bradfitz
LGTM
11 years, 2 months ago (2013-02-05 17:53:45 UTC) #37
bradfitz
11 years, 2 months ago (2013-02-05 17:54:04 UTC) #38
*** Submitted as https://code.google.com/p/go/source/detail?r=8d71734a0cb0 ***

log/syslog: retry once if write fails

Implements deferred connections + single-attempt automatic
retry. Based on CL 5078042 from kuroneko.

Fixes issue 2264.

R=mikioh.mikioh, rsc, bradfitz
CC=golang-dev
https://codereview.appspot.com/6782140

Committer: Brad Fitzpatrick <bradfitz@golang.org>
Sign in to reply to this message.

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