From: Johannes Schindelin Date: Thu, 24 Feb 2022 16:38:17 GMT Subject: Re: [PATCH v5 26/30] fsmonitor--daemon: periodically truncate list of modified files Message-ID: In-Reply-To: <19993c130d22b1f5f7beaee1a23ac2d6b377fec3.1644612979.git.gitgitgadget@gmail.com> Hi Jeff, On Fri, 11 Feb 2022, Jeff Hostetler via GitGitGadget wrote: > From: Jeff Hostetler > > Teach fsmonitor--daemon to periodically truncate the list of > modified files to save some memory. > > Clients will ask for the set of changes relative to a token that they > found in the FSMN index extension in the index. (This token is like a > point in time, but different). Clients will then update the index to > contain the response token (so that subsequent commands will be > relative to this new token). > > Therefore, the daemon can gradually truncate the in-memory list of > changed paths as they become obsolete (older than the previous token). > Since we may have multiple clients making concurrent requests with a > skew of tokens and clients may be racing to the talk to the daemon, > we lazily truncate the list. > > We introduce a 5 minute delay and truncate batches 5 minutes after > they are considered obsolete. I tried to poke holes into this strategy for a while, but failed whichever way I looked. Meaning: I am now convinced that this strategy is sound. Thanks, Dscho