pruning/history: properly communicate via rpc if snapshot does not exist

This commit is contained in:
Christian Schwarz
2018-09-04 13:29:51 -07:00
parent 8799108b55
commit 0c4a3f8dc4
5 changed files with 128 additions and 79 deletions
+2 -2
View File
@@ -434,8 +434,8 @@ func (s *ReplicationStep) doMarkReplicated(ctx context.Context, sender Sender) S
log.WithError(err).Error("error marking snapshot as replicated")
return updateStateError(err)
}
if res.Replicated != true {
err := fmt.Errorf("sender did not report snapshot as replicated")
if res.Status != pdu.SnapshotReplicationStatusRes_Replicated {
err := fmt.Errorf("sender did not report snapshot as replicated: %s", res.Status)
log.Error(err.Error())
return updateStateError(err)
}