mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 00:13:52 +01:00
replication/fsrep: report Pending[0] problem as fsrep problem in RetryWait state
This commit is contained in:
parent
f9d24d15ed
commit
d17ecc3b5c
@ -312,6 +312,13 @@ func (fsr *Replication) Report() *Report {
|
||||
for i := range fsr.pending {
|
||||
rep.Pending[i] = fsr.pending[i].Report()
|
||||
}
|
||||
|
||||
if fsr.state&RetryWait != 0 {
|
||||
if len(rep.Pending) != 0 { // should always be true for RetryWait == true?
|
||||
rep.Problem = rep.Pending[0].Problem
|
||||
}
|
||||
}
|
||||
|
||||
return &rep
|
||||
}
|
||||
|
||||
@ -509,10 +516,15 @@ func (s *ReplicationStep) Report() *StepReport {
|
||||
if s.byteCounter != nil {
|
||||
bytes = s.byteCounter.Bytes()
|
||||
}
|
||||
problem := ""
|
||||
if s.err != nil {
|
||||
problem = s.err.Error()
|
||||
}
|
||||
rep := StepReport{
|
||||
From: from,
|
||||
To: s.to.RelName(),
|
||||
Status: s.state,
|
||||
Problem: problem,
|
||||
Bytes: bytes,
|
||||
ExpectedBytes: s.expectedSize,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user