git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] fsmonitor: flush pending FSEvents before cookie wait

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 4, 2026, 22:13 UTC
Message-ID
<xmqq4ih9ttyc.fsf@gitster.g>
In-Reply-To
<CAOTNsDy4pKbPHdK1T688Ax6Mgz15K-qfZR-8fAvTk48z3E43Rg@mail.gmail.com>
Koji Nakamaru <koji.nakamaru@gree.net> writes:
Show 18 quoted lines
> On Wed, Jul 22, 2026 at 6:05 AM Tamir Duberstein <tamird@gmail.com> wrote:
>>
>> 56cef9cb1a (fsmonitor: use pthread_cond_timedwait for cookie wait,
>> 2026-04-15) limits the cookie wait to one second so that a filesystem
>> which never delivers events cannot hang fsmonitor clients. A client that
>> times out receives a trivial response and scans the entire index.
>>
>> FSEvents can defer delivery while it batches notifications and does not
>> guarantee that its queue is drained in one latency interval. A loaded
>> macOS system can therefore time out even though the event stream is
>> working.
>> ...
>
> This patch is carefully designed to minimize any risks. To drain events,
> we could also call FSEventStreamFlushSync before acquiring main_lock in
> do_handle_client(), but this patch should be sufficient if it mitigates
> the issue. The commit message would be much more convincing if you also
> included benchmark results showing how many timeouts were reduced.

Tamir, just to say that it is my understanding that the ball is in your court. It hasn't been _too_ long since the exchange happened, but we expect people to respond review comments (either positively or negatively) and without such discourse a topic would not move forward, so ...

Thanks.
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 4 of 11 in “fsmonitor: flush pending FSEvents before cookie wait”
  1. fsmonitor: flush pending FSEvents before cookie waitTamir Duberstein, Jul 21, 2026
  2. Koji NakamaruJul 24, 2026
  3. Junio C HamanoJul 24, 2026
  4. Junio C HamanoAug 4, 2026
  5. Patrick SteinhardtAug 5, 2026
  6. Tamir DubersteinAug 11, 2026
  7. Patrick SteinhardtAug 11, 2026
  8. Tamir DubersteinAug 11, 2026
  9. Tamir DubersteinAug 13, 2026
  10. Patrick SteinhardtAug 13, 2026
  11. Junio C HamanoAug 11, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.