Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Move the responsibility to pick an input log from storage to the frontend #1376

Merged
merged 5 commits into from
Nov 6, 2019

Conversation

gdbelvin
Copy link
Contributor

@gdbelvin gdbelvin commented Nov 5, 2019

Allow clients to specify the mutation input log
This permits quality of service prioritization because
input logs are processed in low to high order.

@gdbelvin gdbelvin requested a review from a team as a code owner November 5, 2019 18:02
impl/sql/mutationstorage/mutation_logs.go Outdated Show resolved Hide resolved
core/keyserver/keyserver.go Outdated Show resolved Hide resolved
impl/sql/mutationstorage/mutation_logs.go Show resolved Hide resolved
@gdbelvin gdbelvin requested a review from pav-kv November 6, 2019 11:04
@codecov
Copy link

codecov bot commented Nov 6, 2019

Codecov Report

Merging #1376 into master will increase coverage by 0.3%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1376     +/-   ##
=========================================
+ Coverage   65.41%   65.72%   +0.3%     
=========================================
  Files          51       51             
  Lines        3909     3909             
=========================================
+ Hits         2557     2569     +12     
+ Misses        956      949      -7     
+ Partials      396      391      -5
Impacted Files Coverage Δ
impl/sql/mutationstorage/mutation_logs.go 72.22% <60%> (+0.98%) ⬆️
core/keyserver/keyserver.go 61.63% <60%> (-0.14%) ⬇️
core/integration/client_tests.go 85.24% <0%> (+0.46%) ⬆️
core/sequencer/server.go 71.08% <0%> (+1.36%) ⬆️
impl/sql/directory/storage.go 69.17% <0%> (+1.5%) ⬆️
impl/sql/mutationstorage/mutations.go 72.5% <0%> (+2.5%) ⬆️
core/sequencer/trillian_client.go 62.85% <0%> (+4.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d55590d...38ad2c9. Read the comment docs.

@gdbelvin gdbelvin changed the title Client specified logIDs Move the responsibility to pick an input log from storage to the frontend Nov 6, 2019
@gdbelvin gdbelvin requested a review from mhutchinson November 6, 2019 13:44
@gdbelvin gdbelvin merged commit 8cf3790 into google:master Nov 6, 2019
@gdbelvin gdbelvin deleted the logids branch November 6, 2019 14:31
}

func (m *mutations) ListLogs(ctx context.Context, dirID string, _ bool) ([]int64, error) {
logIDs := []int64{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could pre-allocate len(*m) items here.

@@ -666,6 +674,18 @@ func (s *Server) BatchQueueUserUpdate(ctx context.Context, in *pb.BatchQueueUser
return &empty.Empty{}, nil
}

func (s *Server) randLog(ctx context.Context, directoryID string) (int64, error) {
// TODO(gbelvin): Cache these results.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How badly does this read harm the write performance?

gdbelvin added a commit to gdbelvin/keytransparency that referenced this pull request Nov 13, 2019
* master:
  Define watermarks as micros (google#1384)
  Library for converting time.Time to sequencer watermarks (google#1381)
  Reduce log spam (google#1382)
  Support and test mutation log queries at intermediate timestamps (google#1380)
  In memory logs implementation (google#1375)
  Fix generic comparisons on protobuf messages (google#1379)
  Do pagination the right way (google#1378)
  Move the responsibility to pick an input log from storage to the frontend (google#1376)
  Init metrics for whole test file (google#1373)
  Break layering violation by using native types (google#1374)
  Switch Timestamp storage to mysql DATETIME (google#1369)
  Use testdb in integration tests (google#1371)
gdbelvin added a commit to gdbelvin/keytransparency that referenced this pull request Dec 10, 2019
* master: (22 commits)
  Enable travis build validation (google#1400)
  Use ProtoEqual for gomock reflection equality (google#1401)
  Fixups for deleted test constructor in trillian repo (google#1398)
  Fix the kubernetes configs (google#1397)
  Upgrade dependencies (google#1387)
  Update install instructions for go 1.13 (google#1388)
  Emit metric with the right dimensions (google#1383)
  Define watermarks as micros (google#1384)
  Library for converting time.Time to sequencer watermarks (google#1381)
  Reduce log spam (google#1382)
  Support and test mutation log queries at intermediate timestamps (google#1380)
  In memory logs implementation (google#1375)
  Fix generic comparisons on protobuf messages (google#1379)
  Do pagination the right way (google#1378)
  Move the responsibility to pick an input log from storage to the frontend (google#1376)
  Init metrics for whole test file (google#1373)
  Break layering violation by using native types (google#1374)
  Switch Timestamp storage to mysql DATETIME (google#1369)
  Use testdb in integration tests (google#1371)
  Use and test the same MySQL connection that main.go uses  (google#1370)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants