Remove timeline_start_lsn check temporary. (#1964)

This commit is contained in:
Arthur Petukhovsky
2022-06-21 02:02:24 +03:00
committed by GitHub
parent 37465dafe3
commit 6c4d6a2183
2 changed files with 4 additions and 7 deletions

View File

@@ -199,9 +199,8 @@ impl ReplicationConn {
runtime.block_on(async move {
let (_, persisted_state) = spg.timeline.get().get_state();
if persisted_state.server.wal_seg_size == 0
|| persisted_state.timeline_start_lsn == Lsn(0)
{
// add persisted_state.timeline_start_lsn == Lsn(0) check
if persisted_state.server.wal_seg_size == 0 {
bail!("Cannot start replication before connecting to walproposer");
}

View File

@@ -531,10 +531,8 @@ impl WalReader {
);
}
if state.server.wal_seg_size == 0
|| state.timeline_start_lsn == Lsn(0)
|| state.local_start_lsn == Lsn(0)
{
// TODO: add state.timeline_start_lsn == Lsn(0) check
if state.server.wal_seg_size == 0 || state.local_start_lsn == Lsn(0) {
bail!("state uninitialized, no data to read");
}