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

Issue 1846263002: Isolate: Use generators instead of seekers (Closed)

Created:
4 years, 8 months ago by dnj
Modified:
4 years, 4 months ago
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, andrew.wang, todd, tandrii+luci-go_chromium.org, M-A Ruel
Base URL:
https://github.com/luci/luci-go@master
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

Isolate: Use generators instead of seekers Have Isolate use generators to obtain io.ReadCloser instances instead of reusing a single io.ReadCloser instance via Seek. This greatly simplifies the code and ensures a clean division between HTTP request data on retry. In the standard case, this will require one additional file open per archival, but will demand far fewer simultaneously-open file handles. BUG=chromium:598754 TEST=None Committed: https://github.com/luci/luci-go/commit/50fe3c609c97b5effbc76d816a439fd19ab620ec

Patch Set 1 #

Total comments: 12

Patch Set 2 : Tweaks from comments. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -282 lines) Patch
M client/archiver/archiver.go View 1 9 chunks +33 lines, -56 lines 0 comments Download
M client/archiver/archiver_test.go View 4 chunks +2 lines, -17 lines 0 comments Download
M client/archiver/utils.go View 2 chunks +2 lines, -1 line 0 comments Download
M client/internal/lhttp/client.go View 6 chunks +47 lines, -79 lines 0 comments Download
M client/internal/lhttp/client_test.go View 8 chunks +16 lines, -49 lines 0 comments Download
M client/isolate/isolate.go View 2 chunks +2 lines, -1 line 0 comments Download
M client/isolatedclient/isolatedclient.go View 1 7 chunks +59 lines, -75 lines 2 comments Download
M client/isolatedclient/isolatedclient_test.go View 4 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 19 (8 generated)
dnj
PTAL. I was about halfway through this when I really appreciated the scope of the ...
4 years, 8 months ago (2016-04-01 16:59:59 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1846263002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1846263002/1
4 years, 8 months ago (2016-04-01 17:00:16 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-01 17:04:24 UTC) #6
M-A Ruel
Small nits, lgtm. https://codereview.chromium.org/1846263002/diff/1/client/archiver/archiver.go File client/archiver/archiver.go (right): https://codereview.chromium.org/1846263002/diff/1/client/archiver/archiver.go#newcode195 client/archiver/archiver.go:195: path string // True if this ...
4 years, 8 months ago (2016-04-01 17:26:05 UTC) #7
dnj
https://codereview.chromium.org/1846263002/diff/1/client/archiver/archiver.go File client/archiver/archiver.go (right): https://codereview.chromium.org/1846263002/diff/1/client/archiver/archiver.go#newcode195 client/archiver/archiver.go:195: path string // True if this is file backed. ...
4 years, 8 months ago (2016-04-01 18:49:12 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1846263002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1846263002/20001
4 years, 8 months ago (2016-04-01 18:49:54 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-01 18:53:24 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1846263002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1846263002/20001
4 years, 8 months ago (2016-04-01 19:23:50 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://github.com/luci/luci-go/commit/50fe3c609c97b5effbc76d816a439fd19ab620ec
4 years, 8 months ago (2016-04-01 19:25:50 UTC) #17
M-A Ruel
https://codereview.chromium.org/1846263002/diff/20001/client/isolatedclient/isolatedclient.go File client/isolatedclient/isolatedclient.go (right): https://codereview.chromium.org/1846263002/diff/20001/client/isolatedclient/isolatedclient.go#newcode244 client/isolatedclient/isolatedclient.go:244: if _, err := io.CopyBuffer(compressor, src, buf); err != ...
4 years, 4 months ago (2016-08-19 17:23:34 UTC) #18
dnj
4 years, 4 months ago (2016-08-19 22:33:14 UTC) #19
Message was sent while issue was closed.
https://codereview.chromium.org/1846263002/diff/20001/client/isolatedclient/i...
File client/isolatedclient/isolatedclient.go (right):

https://codereview.chromium.org/1846263002/diff/20001/client/isolatedclient/i...
client/isolatedclient/isolatedclient.go:244: if _, err :=
io.CopyBuffer(compressor, src, buf); err != nil {
On 2016/08/19 17:23:34, M-A Ruel wrote:
> I was rereading this code and do not understand why you changed from io.Copy()
> to io.CopyBuffer(). Can you explain?

I think my intent was to be able to control the buffer size via const, but I
left it the same as "io.Copy" immediately so behavior didn't change.

Powered by Google App Engine
This is Rietveld 408576698