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

Re: [PATCH 0/2] Fix fsmonitor after discard_index()

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 18, 2019, 11:05 UTC
Message-ID
<87ef74a1dv.fsf@evledraar.gmail.com>
In-Reply-To
<pull.165.git.gitgitgadget@gmail.com>
On Sat, Mar 16 2019, Johannes Schindelin via GitGitGadget wrote:
Show 9 quoted lines
> It was reported by Ævar Arnfjörð Bjarmason
> [https://public-inbox.org/git/nycvar.QRO.7.76.6.1903142058130.41@tvgsbejvaqbjf.bet/T/#mb8718fe52e4721dacd3b143a09187ff9090ef4e3]
> that there were problems with the fsmonitor feature in conjunction with the
> newly built-in git stash/git rebase.
>
> The culprit really is that the fsmonitor flag that says whether it was
> queried already was not re-set after discard_index() was called by mistake.
>
> This fixes that, and apparently also other long-standing fsmonitor issues.

I've added this to my internal build & now the test suite passes in the fsmonitor mode without any test skipping.

> (Note that there is still a flakiness around t7519
> [https://github.com/git-for-windows/git/pull/2127#pullrequestreview-215010574]
> where it tries to make sure that the fsmonitor hook can prevent unnecessary
> lstat() calls, but that seems to be unrelated to this here bug.)

FWIW Since February 1st, 2018 I've run my builds on CentOS [67] through an GIT_FSMONITOR_TEST=$PWD/t7519/fsmonitor-all test and have never encountered this flakyness, and I built pretty much on every "next" push-out.

The fix sounds good, just one data point on the rarity of the race in practice. I hadn't noticed this being flaky.

Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin
Message 6 of 17 in “Fix fsmonitor after discard_index()”
  1. 0/2 Fix fsmonitor after discard_index()Johannes Schindelin via GitGitGadget, Mar 16, 2019
  2. 1/2 fsmonitor: demonstrate that it is not refreshed after discard_index()Johannes Schindelin via GitGitGadget, Mar 16, 2019
  3. Johannes SixtMar 16, 2019
  4. Johannes SchindelinMar 21, 2019
  5. 2/2 fsmonitor: force a refresh after the index was discardedJohannes Schindelin via GitGitGadget, Mar 16, 2019
  6. Ævar Arnfjörð BjarmasonMar 18, 2019
  7. Johannes SchindelinMar 21, 2019
  8. Johannes SchindelinMay 23, 2019
  9. 0/2 Fix fsmonitor after discard_index()Johannes Schindelin via GitGitGadget, Mar 21, 2019
  10. 1/2 fsmonitor: demonstrate that it is not refreshed after discard_index()Johannes Schindelin via GitGitGadget, Mar 21, 2019
  11. 2/2 fsmonitor: force a refresh after the index was discardedJohannes Schindelin via GitGitGadget, Mar 21, 2019
  12. SZEDER GáborMar 22, 2019
  13. 0/2 Fix fsmonitor after discard_index()Ævar Arnfjörð Bjarmason, May 7, 2019
  14. Junio C HamanoMay 7, 2019
  15. Junio C HamanoMay 8, 2019
  16. 1/2 fsmonitor: demonstrate that it is not refreshed after discard_index()Ævar Arnfjörð Bjarmason, May 7, 2019
  17. 2/2 fsmonitor: force a refresh after the index was discardedÆvar Arnfjörð Bjarmason, May 7, 2019

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.