Re: [PATCH v3 2/3] t/lib-httpd: make http-429 first-request check atomic
From: Michael Montalbo <hidden>
Date: 2026-08-31 17:32:06
On Mon, Aug 31, 2026 at 7:51 AM Junio C Hamano [off-list ref] wrote:
I too find it disturbing it that the messages from this author tends to contain material that triggers "it may not be wrong, but is it relevant?" reactions. More does not mean better.
Thank you for this feedback. I agree with it and will avoid relying on AI as I have to create and edit prose for documentation and cover letters.
The above made me curious enough to ask a near-by Gemini to distill
it down to quarter of the original length without losing essense of
the original.
http-429.sh marks that a 429 response was served by creating a
state file with "test -f" and "touch". This check-and-set
sequence is not atomic and can race under concurrent Apache
requests, causing multiple requests to claim first-arrival
status.
Replace the check and "touch" with an atomic "mkdir", which
fails if the directory already exists. In "permanent" mode,
skip the "mkdir" entirely so no state marker is ever created.
Omit a regression test, as this concurrency window cannot be
forced deterministically without artificial synchronization
points.
This seems readable enough to me, but may still need some manual
clean-up, but this experiment told me that "A lot of AI-fluff" is
not something users cannot avoid without some extra work.I agree, even though I have spent a lot of time trying to "copy-edit" what is generated, the end result does tend to be verbose and include unnecessary detail. Compared to what I start with based on my initial idea and generated rough draft, a lot has been edited away. However, I do think I have regretfully avoided doing some of that extra work. Apologies for having you all read unnecessary AI-fluff, I will write prose for documentation and similar from scratch.