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

Re: [PATCH 1/1] lock_packed_refs(): fix cache validity check

From
Jeff King <peff@peff.net>
Date
Jun 12, 2017, 18:21 UTC
Message-ID
<20170612182142.6giu6ovjwx2fjkzp@sigill.intra.peff.net>
In-Reply-To
<18f059555ce0e4f46fba783973947f6a26ac4b65.1497253685.git.mhagger@alum.mit.edu>
On Mon, Jun 12, 2017 at 10:06:13AM +0200, Michael Haggerty wrote:
Show 12 quoted lines
> So instead:
> 
> * Extract a function `validate_packed_ref_cache()` that does the
>   validity check independent of whether the lock is held.
> 
> * Change `get_packed_ref_cache()` to call the new function, but only
>   if the lock *isn't* held.
> 
> * Change `lock_packed_refs()` to call the new function in any case
>   before calling `get_packed_ref_cache()`.
> 
> * Fix the comment in `lock_packed_refs()`.

Your explanation makes perfect sense, and I agree this should fix the problem. Sorry to have missed it in review.

-Peff
Previous: Michael Haggerty
Message 3 of 3 in “Fix for mh/packed-ref-store-prep”
  1. 0/1 Fix for mh/packed-ref-store-prepMichael Haggerty, Jun 12, 2017
  2. 1/1 lock_packed_refs(): fix cache validity checkMichael Haggerty, Jun 12, 2017
  3. Jeff KingJun 12, 2017

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.