Skip to content

Praefect reconcile hangs and fails in case of an error during processing

Pavlo Strokov requested to merge ps-reconcile-hangs into master

When 'reconcile' sub-command is invoked and processing starts and there are more then one repository to reconcile if the first one will be reconciled with some kind of failure the context would be cancelled and there won't be consuming from the 'relpathQ' and as 'walkerQ' is not buffered the goroutine will hang causing all 'reconcile' operation to hang. The fix is to attempt to send to the channel in parallel with listening for context cancellation. As it uses 'errgroup.WithContext' to spin up and run the pipeline goroutines the failure in one of those will cancel the context, so all other goroutines will be notified about termination.

Closes: #2993 (closed)
Closes: #2839 (closed)

Edited by Sami Hiltunen

Merge request reports