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
@@ -655,6 +655,12 @@
primary key (id)
);
create table "SqlReplayCheckpoint" (
revision_id int8 not null,
last_replay_time timestamptz,
primary key (revision_id)
);
create table "Tld" (
tld_name text not null,
add_grace_period_length interval not null,
@@ -948,6 +948,16 @@ CREATE SEQUENCE public."SignedMarkRevocationList_revision_id_seq"
ALTER SEQUENCE public."SignedMarkRevocationList_revision_id_seq" OWNED BY public."SignedMarkRevocationList".revision_id;
--
-- Name: SqlReplayCheckpoint; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public."SqlReplayCheckpoint" (
revision_id bigint NOT NULL,
last_replay_time timestamp with time zone NOT NULL
);
--
-- Name: Tld; Type: TABLE; Schema: public; Owner: -
--
@@ -1346,6 +1356,14 @@ ALTER TABLE ONLY public."SignedMarkRevocationList"
ADD CONSTRAINT "SignedMarkRevocationList_pkey" PRIMARY KEY (revision_id);
--
-- Name: SqlReplayCheckpoint SqlReplayCheckpoint_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."SqlReplayCheckpoint"
ADD CONSTRAINT "SqlReplayCheckpoint_pkey" PRIMARY KEY (revision_id);
--
-- Name: Tld Tld_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--