Add SQL replay checkpoint object to SQL (#868)

* Add SQL replay checkpoint object to Datastore

This will be part of the asynchronous commit-log replay to SQL. Whenever
we successfully export commits up to a particular time, we should
persist that time so we don't replay the same commits again (it is not
idempotent)

* Move SqlReplayCheckpoint from DS to SQL

* Responses to CR
This commit is contained in:
gbrodman
2020-11-10 17:09:18 -05:00
committed by GitHub
parent 82cc7b59fe
commit f1eb1a8fe7
12 changed files with 387 additions and 107 deletions
@@ -0,0 +1,19 @@
-- Copyright 2020 The Nomulus Authors. All Rights Reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
CREATE TABLE "SqlReplayCheckpoint" (
revision_id int8 not null,
last_replay_time timestamptz not null,
PRIMARY KEY(revision_id)
);