Fix subtle replication bug (#1370)
When going from REPLICA to MAIN, need to ensure current WAL files are finalised.
This commit is contained in:
parent
9524a51576
commit
64bf75117b
@ -47,7 +47,7 @@ bool ReplicationHandler::SetReplicationRoleMain() {
|
||||
// ensure replica server brought down
|
||||
storage_.repl_storage_state_.replication_server_.reset(nullptr);
|
||||
// Remember old epoch + storage timestamp association
|
||||
storage_.repl_storage_state_.AddEpochToHistory(current_epoch);
|
||||
storage_.PrepareForNewEpoch(current_epoch);
|
||||
}
|
||||
|
||||
// STEP 2) Change to MAIN
|
||||
|
Loading…
Reference in New Issue
Block a user