diff options
author | Valery Piashchynski <[email protected]> | 2021-07-14 16:46:32 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-14 16:46:32 +0300 |
commit | 4151bbffe7b3ab882de5f7ac29f41c974679f087 (patch) | |
tree | c29840fe2b0e530c069f47ec956b606cd8ff6b1d /pkg/worker/sync_worker.go | |
parent | 9d018f259b45be9268ae85e089a07f25de894f41 (diff) |
Fix TTL issue, added explanation comments.
The worker after it executed the request, may overwrite the TTL state.
This inconsistency leads to the +1 worker in the FIFO channel.
In this state, the Push operation was blocked.
Add RR_BROADCAST_PATH.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/worker/sync_worker.go')
-rwxr-xr-x | pkg/worker/sync_worker.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/worker/sync_worker.go b/pkg/worker/sync_worker.go index 84ff5977..02f11d0b 100755 --- a/pkg/worker/sync_worker.go +++ b/pkg/worker/sync_worker.go @@ -60,6 +60,13 @@ func (tw *SyncWorkerImpl) Exec(p payload.Payload) (payload.Payload, error) { return payload.Payload{}, errors.E(op, err) } + // supervisor may set state of the worker during the work + // in this case we should not re-write the worker state + if tw.process.State().Value() != StateWorking { + tw.process.State().RegisterExec() + return rsp, nil + } + tw.process.State().Set(StateReady) tw.process.State().RegisterExec() |