mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 08:23:50 +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 {
|
for i := range fsr.pending {
|
||||||
rep.Pending[i] = fsr.pending[i].Report()
|
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
|
return &rep
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,10 +516,15 @@ func (s *ReplicationStep) Report() *StepReport {
|
|||||||
if s.byteCounter != nil {
|
if s.byteCounter != nil {
|
||||||
bytes = s.byteCounter.Bytes()
|
bytes = s.byteCounter.Bytes()
|
||||||
}
|
}
|
||||||
|
problem := ""
|
||||||
|
if s.err != nil {
|
||||||
|
problem = s.err.Error()
|
||||||
|
}
|
||||||
rep := StepReport{
|
rep := StepReport{
|
||||||
From: from,
|
From: from,
|
||||||
To: s.to.RelName(),
|
To: s.to.RelName(),
|
||||||
Status: s.state,
|
Status: s.state,
|
||||||
|
Problem: problem,
|
||||||
Bytes: bytes,
|
Bytes: bytes,
|
||||||
ExpectedBytes: s.expectedSize,
|
ExpectedBytes: s.expectedSize,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user