mirror of
https://github.com/zrepl/zrepl.git
synced 2025-06-20 01:37:45 +02:00
daemon/job: explicit notice of ZREPL_JOB_WATCHDOG_TIMEOUT environment variable on cancellation
This commit is contained in:
parent
2889a5d5ff
commit
98bc8d1717
@ -315,12 +315,14 @@ func (j *ActiveSide) do(ctx context.Context) {
|
|||||||
|
|
||||||
log.WithField("state", tasks.state).Debug("watchdog firing")
|
log.WithField("state", tasks.state).Debug("watchdog firing")
|
||||||
|
|
||||||
|
const WATCHDOG_ENVCONST_NOTICE = " (adjust ZREPL_JOB_WATCHDOG_TIMEOUT env variable if inappropriate)"
|
||||||
|
|
||||||
switch tasks.state {
|
switch tasks.state {
|
||||||
case ActiveSideReplicating:
|
case ActiveSideReplicating:
|
||||||
log.WithField("replication_progress", tasks.replication.Progress.String()).
|
log.WithField("replication_progress", tasks.replication.Progress.String()).
|
||||||
Debug("check replication progress")
|
Debug("check replication progress")
|
||||||
if tasks.replication.Progress.CheckTimeout(wdto, jitter) {
|
if tasks.replication.Progress.CheckTimeout(wdto, jitter) {
|
||||||
log.Error("replication did not make progress, cancelling")
|
log.Error("replication did not make progress, cancelling" + WATCHDOG_ENVCONST_NOTICE)
|
||||||
tasks.replicationCancel()
|
tasks.replicationCancel()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -328,7 +330,7 @@ func (j *ActiveSide) do(ctx context.Context) {
|
|||||||
log.WithField("prune_sender_progress", tasks.replication.Progress.String()).
|
log.WithField("prune_sender_progress", tasks.replication.Progress.String()).
|
||||||
Debug("check pruner_sender progress")
|
Debug("check pruner_sender progress")
|
||||||
if tasks.prunerSender.Progress.CheckTimeout(wdto, jitter) {
|
if tasks.prunerSender.Progress.CheckTimeout(wdto, jitter) {
|
||||||
log.Error("pruner_sender did not make progress, cancelling")
|
log.Error("pruner_sender did not make progress, cancelling" + WATCHDOG_ENVCONST_NOTICE)
|
||||||
tasks.prunerSenderCancel()
|
tasks.prunerSenderCancel()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -336,7 +338,7 @@ func (j *ActiveSide) do(ctx context.Context) {
|
|||||||
log.WithField("prune_receiver_progress", tasks.replication.Progress.String()).
|
log.WithField("prune_receiver_progress", tasks.replication.Progress.String()).
|
||||||
Debug("check pruner_receiver progress")
|
Debug("check pruner_receiver progress")
|
||||||
if tasks.prunerReceiver.Progress.CheckTimeout(wdto, jitter) {
|
if tasks.prunerReceiver.Progress.CheckTimeout(wdto, jitter) {
|
||||||
log.Error("pruner_receiver did not make progress, cancelling")
|
log.Error("pruner_receiver did not make progress, cancelling" + WATCHDOG_ENVCONST_NOTICE)
|
||||||
tasks.prunerReceiverCancel()
|
tasks.prunerReceiverCancel()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user