Chromium Code Reviews
DescriptionLogDog: Fix archived log stream read errors.
Fix some bugs in LogDog and associated libraries that prevented reading
very large Google Storage archived streams.
Fundamentally, Google Storage reads were not upper-bounded, despite the
fact that we had the information to do so. This caused (minimally) more
data than necessary to be fetched for a given request, and (in this
case) a request to be issued that exceeded GAE's `urlfetch` upper bound,
32MB. We fix this by updating the archive log storage instance to
calculate an upper offset when requesting log stream ranges.
This exposed a bug in Google Storage library, where "from" and "to"
parameters (absolute byte offsets) were being translated to "offset" and
"length" parameters (with "length" relative to "offset"). This is fixed
by explicitly standardizing on offset/length.
Some `logs.Get` endpoint tests constrain byte count. Because we're now
specifying upper bound, this caused them to return fewer logs than
expected because the byte count being applied didn't include the RecordIO
frame size. We fix this by calculating the frame size and factoring that
into the byte range requests.
BUG=chromium:604610
TEST=live
- Deployed to afflicted system, verified that log stream is now
functional.
Committed: https://github.com/luci/luci-go/commit/1ec9fb582858f2063f64030370c9912b518726f6
Patch Set 1 #
Total comments: 20
Patch Set 2 : Fix nits. #Patch Set 3 : Panic on invalid offset. #Patch Set 4 : Delete "offset()" method. #
Depends on Patchset: Messages
Total messages: 15 (4 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||