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

2012-12-16 Thread Junio C Hamano
Nguyen Thai Ngoc Duy wrote: >On Sun, Dec 16, 2012 at 2:20 PM, Junio C Hamano >wrote: >> 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. > >A hand crafted one, maybe. I did not attempt to recreate it

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

2012-12-16 Thread Nguyen Thai Ngoc Duy
On Sun, Dec 16, 2012 at 2:20 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> 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 >> >>

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

2012-12-15 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > 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

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

2012-12-15 Thread Nguyễn Thái Ngọc Duy
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 automa