publish: Send uncached narinfo replies from the main thread.
authorLudovic Courtès <ludo@gnu.org>
Fri, 29 Apr 2022 15:56:30 +0000 (17:56 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 29 Apr 2022 16:07:17 +0000 (18:07 +0200)
commitc1719a0adf3fa7611b56ca4d75b3ac8cf5c9c8ac
tree23ecb9f21486f5a2387f05997941d5b61e93eeda
parent73eeeeafbb0765f76834b53c9fe6cf3c8f740840
publish: Send uncached narinfo replies from the main thread.

Fixes <https://issues.guix.gnu.org/54723>.
Reported by Guillaume Le Vaillant <glv@posteo.net>.

Regression introduced in f743f2046be2c5a338ab871ae8666d8f6de7440b.

With commit f743f2046be2c5a338ab871ae8666d8f6de7440b, responses to
pipelined GETs would end up being written concurrently by many threads.
Thus the body of those responses could be interleaved and garbled.

* guix/scripts/publish.scm: Revert
f743f2046be2c5a338ab871ae8666d8f6de7440b.
* tests/publish.scm ("/*.narinfo pipeline"): New test.
guix/scripts/publish.scm
tests/publish.scm