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

Re: [PATCH v4 3/4] cache-tree: fix writing cache-tree when CE_REMOVE is present

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 16, 2012, 07:20 UTC
Message-ID
<7vk3siqx8b.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1355631328-26678-4-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
Show 9 quoted lines
> entry_count is used in update_one() for two purposes:
>
> 1. to skip through the number of processed entries in in-memory index
> 2. to record the number of entries this cache-tree covers on disk
>
> Unfortunately when CE_REMOVE is present these numbers are not the same
> because CE_REMOVE entries are automatically removed before writing to
> disk but entry_count is not adjusted and still counts CE_REMOVE
> entries.

Nicely explained. I wonder if we can also add a piece of test to the patch 4/4 to demonstrate the issue with CE_REMOVE entries, though.

Thanks.
Previous: Nguyễn Thái Ngọc DuyNext: Nguyen Thai Ngoc Duy
Message 5 of 8 in “nd/invalidate-i-t-a-cache-tree”
  1. 0/4 nd/invalidate-i-t-a-cache-treeNguyễn Thái Ngọc Duy, Dec 16, 2012
  2. 1/4 cache-tree: remove dead i-t-a code in verify_cache()Nguyễn Thái Ngọc Duy, Dec 16, 2012
  3. 2/4 cache-tree: replace "for" loops in update_one with "while" loopsNguyễn Thái Ngọc Duy, Dec 16, 2012
  4. 3/4 cache-tree: fix writing cache-tree when CE_REMOVE is presentNguyễn Thái Ngọc Duy, Dec 16, 2012
  5. Junio C HamanoDec 16, 2012
  6. Nguyen Thai Ngoc DuyDec 16, 2012
  7. Junio C HamanoDec 16, 2012
  8. 4/4 cache-tree: invalidate i-t-a paths after generating treesNguyễn Thái Ngọc Duy, Dec 16, 2012

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.