From ebfa8d36c22d9f9ac8f577e3759b9504a97c52e1 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 14 Dec 2020 16:57:10 +0000 Subject: [PATCH] Include keyserver position tweak --- keyserver/storage/postgres/key_changes_table.go | 1 + keyserver/storage/sqlite3/key_changes_table.go | 1 + 2 files changed, 2 insertions(+) diff --git a/keyserver/storage/postgres/key_changes_table.go b/keyserver/storage/postgres/key_changes_table.go index d7f0991a6..df4b47e79 100644 --- a/keyserver/storage/postgres/key_changes_table.go +++ b/keyserver/storage/postgres/key_changes_table.go @@ -82,6 +82,7 @@ func (s *keyChangesStatements) SelectKeyChanges( if toOffset == sarama.OffsetNewest { toOffset = math.MaxInt64 } + latestOffset = fromOffset rows, err := s.selectKeyChangesStmt.QueryContext(ctx, partition, fromOffset, toOffset) if err != nil { return nil, 0, err diff --git a/keyserver/storage/sqlite3/key_changes_table.go b/keyserver/storage/sqlite3/key_changes_table.go index 32721eaea..b4753ccc5 100644 --- a/keyserver/storage/sqlite3/key_changes_table.go +++ b/keyserver/storage/sqlite3/key_changes_table.go @@ -83,6 +83,7 @@ func (s *keyChangesStatements) SelectKeyChanges( if toOffset == sarama.OffsetNewest { toOffset = math.MaxInt64 } + latestOffset = fromOffset rows, err := s.selectKeyChangesStmt.QueryContext(ctx, partition, fromOffset, toOffset) if err != nil { return nil, 0, err