Skip to content

Require trailing flush in pktline.EachSidebandPacket

Jacob Vosmaer requested to merge jv-pack-objects-hook-end-of-stream into master

This changes the behavior of pktline.EachSidebandPacket to expect a trailing flush packet. The old behavior was to expect the stream to end on a packet boundary.

This is part of gitlab-com/gl-infra&463 (closed), where we need to be able to signal "end of stream" in a natural way and we cannot use EOF.

There is only one call site for EachSidebandPacket, and that call site (PackObjectsHook) only consumes byte streams produced by the same Gitaly process. In other words, this change is safe in spite of being incompatible with the old behavior, because it can never be exposed to the old behavior.

This will help both gitlab-com/gl-infra/scalability#1126 (closed) and gitlab-com/gl-infra/scalability#1128 (closed).

Merge request reports