Skip to content

gitaly: Buffer command output on context done

Pavlo Strokov requested to merge ps-ctx-done-cmd-buffering into master

This is an attempt to prevent a failure on reading from the command output and context cancellation. When the context is done the termination signal is sent to the command to stop it. The handling of the signal by the command may delay, so it may proceed its execution, produce an output and finish with 0 code. That is why before discarding the full command output we now store its 1024 bytes and discard anything else because of safety reasons. This data can now be read from the command by another goroutine.

Closes: #5021 (closed)

Merge request reports