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

Issue 2611253005: Fix BigTable multi-entry row cached Tail. (Closed)

Created:
3 years, 11 months ago by dnj
Modified:
3 years, 11 months ago
Reviewers:
Vadim Sh., estaab
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, maruel+w_chromium.org, tandrii+luci-go_chromium.org
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

Fix BigTable multi-entry row cached Tail. When performing a Tail, LogDog has to scan through all of a log's BigTable rows to identify the last contiguous entry. In order to optimize this, the BigTable storage implementation caches the last contiguous tail index in memcache. BigTable rows are keyed on their LAST log entry index, not their first, so the cached log index was the last index in the row. If the row contained multiple log entries, this violated an earlier continuity check, which was expecting the first index in the row, not the last, to match the cached index. We fix this by caching the first index in the row, matching continuity expectaitons. BUG=chromium:678831 TEST=unit,local - Added regression unit test, passes now. - Use multi-round Tail on `logdog_bigtable_test` before and after, verify that it works now. R=vadimsh@chromium.org Review-Url: https://codereview.chromium.org/2611253005 Committed: https://github.com/luci/luci-go/commit/77c4eac9a4bf4c8818dbddcea7b91cba90a20d75

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -59 lines) Patch
M logdog/common/storage/bigtable/cache.go View 1 chunk +3 lines, -0 lines 0 comments Download
M logdog/common/storage/bigtable/logdog_bigtable_test/main.go View 8 chunks +68 lines, -55 lines 1 comment Download
M logdog/common/storage/bigtable/rowKey.go View 2 chunks +6 lines, -0 lines 0 comments Download
M logdog/common/storage/bigtable/storage.go View 3 chunks +5 lines, -3 lines 0 comments Download
M logdog/common/storage/bigtable/storage_test.go View 4 chunks +25 lines, -1 line 0 comments Download

Messages

Total messages: 10 (4 generated)
dnj
3 years, 11 months ago (2017-01-06 18:50:17 UTC) #1
dnj
PTAL
3 years, 11 months ago (2017-01-06 18:50:36 UTC) #3
dnj
https://codereview.chromium.org/2611253005/diff/1/logdog/common/storage/bigtable/logdog_bigtable_test/main.go File logdog/common/storage/bigtable/logdog_bigtable_test/main.go (right): https://codereview.chromium.org/2611253005/diff/1/logdog/common/storage/bigtable/logdog_bigtable_test/main.go#newcode1 logdog/common/storage/bigtable/logdog_bigtable_test/main.go:1: // Copyright 2016 The LUCI Authors. All rights reserved. ...
3 years, 11 months ago (2017-01-06 18:51:41 UTC) #4
Vadim Sh.
lgtm
3 years, 11 months ago (2017-01-06 20:31:34 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2611253005/1
3 years, 11 months ago (2017-01-06 20:54:54 UTC) #7
commit-bot: I haz the power
3 years, 11 months ago (2017-01-06 21:01:37 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://github.com/luci/luci-go/commit/77c4eac9a4bf4c8818dbddcea7b91cba90a20d75

Powered by Google App Engine
This is Rietveld 408576698