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

Re: [PATCH v1 00/19] Add configuration options for split-index

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 24, 2016, 18:07 UTC
Message-ID
<xmqq8ttd7h8g.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20161023092648.12086-1-chriscool@tuxfamily.org>
Christian Couder <christian.couder@gmail.com> writes:
Show 10 quoted lines
> The design is similar as the previous work that introduced
> "core.untrackedCache". 
>
> The new "core.splitIndex" configuration option can be either true,
> false or undefined which is the default.
>
> When it is true, the split index is created, if it does not already
> exists, when the index is read. When it is false, the split index is
> removed if it exists, when the index is read. Otherwise it is left as
> is.
I admit I haven't thought it through, but this sounds OK.
Show 21 quoted lines
> Along with this new configuration variable, the two following options
> are also introduced:
>
>     - splitIndex.maxPercentChange
>
>     This is to avoid having too many changes accumulating in the split
>     index while in split index mode. The git-update-index
>     documentation says:
>
> 	If split-index mode is already enabled and `--split-index` is
> 	given again, all changes in $GIT_DIR/index are pushed back to
> 	the shared index file.
>
>     but it is probably better to not expect the user to think about it
>     and to have a mechanism that pushes back all changes to the shared
>     index file automatically when some threshold is reached.
>
>     The default threshold is when the number of entries in the split
>     index file reaches 20% (by default) of the number of entries in
>     the shared index file. The new "splitIndex.maxPercentChange"
>     config option lets people tweak this value.
OK.
Show 9 quoted lines
>     - splitIndex.sharedIndexExpire
>
>     To make sure that old sharedindex files are eventually removed
>     when a new one has been created, we "touch" the shared index file
>     every time it is used by a new split index file. Then we can
>     delete shared indexes with an mtime older than one week (by
>     default), when we create a new shared index file. The new
>     "splitIndex.sharedIndexExpire" config option lets people tweak
>     this grace period.

I do not quite understand this justification. Doesn't each of the "this hold only changes since the base index file" files have a backpointer that names the base index file it is a delta against?

Is it safe to remove a base index file when there is still a split index file that points at it?

IOW, I do not see why it can be safe for the expiration decision to be based on timestamp (I would understand it if it were based on a refcnt, though).

Previous: Christian CouderNext: Duy Nguyen
Message 55 of 66 in “Add configuration options for split-index”
  1. 00/19 Add configuration options for split-indexChristian Couder, Oct 23, 2016
  2. 02/19 config: add git_config_get_split_index()Christian Couder, Oct 23, 2016
  3. 05/19 update-index: warn in case of split-index incoherencyChristian Couder, Oct 23, 2016
  4. Duy NguyenOct 25, 2016
  5. Christian CouderOct 29, 2016
  6. Junio C HamanoNov 1, 2016
  7. Christian CouderNov 1, 2016
  8. Junio C HamanoNov 2, 2016
  9. 04/19 read-cache: add and then use tweak_split_index()Christian Couder, Oct 23, 2016
  10. 01/19 split-index: s/eith/with/ typo fixChristian Couder, Oct 23, 2016
  11. 03/19 split-index: add {add,remove}_split_index() functionsChristian Couder, Oct 23, 2016
  12. Duy NguyenOct 25, 2016
  13. Christian CouderOct 29, 2016
  14. Duy NguyenNov 7, 2016
  15. Duy NguyenNov 9, 2016
  16. Christian CouderNov 9, 2016
  17. 07/19 Documentation/config: add information for core.splitIndexChristian Couder, Oct 23, 2016
  18. 09/19 config: add git_config_get_max_percent_split_change()Christian Couder, Oct 23, 2016
  19. Duy NguyenOct 25, 2016
  20. Christian CouderOct 29, 2016
  21. Junio C HamanoNov 1, 2016
  22. Christian CouderNov 5, 2016
  23. 13/19 sha1_file: make check_and_freshen_file() non staticChristian Couder, Oct 23, 2016
  24. 12/19 Documentation/config: add splitIndex.maxPercentChangeChristian Couder, Oct 23, 2016
  25. Junio C HamanoNov 1, 2016
  26. Christian CouderNov 5, 2016
  27. Junio C HamanoNov 6, 2016
  28. 11/19 t1700: add tests for splitIndex.maxPercentChangeChristian Couder, Oct 23, 2016
  29. Junio C HamanoNov 1, 2016
  30. 10/19 read-cache: regenerate shared index if necessaryChristian Couder, Oct 23, 2016
  31. Ramsay JonesOct 23, 2016
  32. Christian CouderOct 29, 2016
  33. Duy NguyenOct 25, 2016
  34. Christian CouderOct 29, 2016
  35. 15/19 config: add git_config_get_date_string() from gc.cChristian Couder, Oct 23, 2016
  36. Junio C HamanoNov 1, 2016
  37. Christian CouderNov 23, 2016
  38. Junio C HamanoNov 23, 2016
  39. Christian CouderNov 28, 2016
  40. Junio C HamanoNov 28, 2016
  41. 17/19 t1700: test shared index file expirationChristian Couder, Oct 23, 2016
  42. 18/19 Documentation/config: add splitIndex.sharedIndexExpireChristian Couder, Oct 23, 2016
  43. 19/19 Documentation/git-update-index: explain splitIndex.*Christian Couder, Oct 23, 2016
  44. 16/19 read-cache: unlink old sharedindex filesChristian Couder, Oct 23, 2016
  45. Duy NguyenOct 25, 2016
  46. Duy NguyenOct 27, 2016
  47. Christian CouderOct 27, 2016
  48. Junio C HamanoOct 27, 2016
  49. Duy NguyenOct 29, 2016
  50. 08/19 Documentation/git-update-index: talk about core.splitIndex config varChristian Couder, Oct 23, 2016
  51. 14/19 read-cache: touch shared index files when usedChristian Couder, Oct 23, 2016
  52. Duy NguyenOct 25, 2016
  53. Junio C HamanoNov 1, 2016
  54. 06/19 t1700: add tests for core.splitIndexChristian Couder, Oct 23, 2016
  55. Junio C HamanoOct 24, 2016
  56. Duy NguyenOct 25, 2016
  57. Junio C HamanoOct 25, 2016
  58. Duy NguyenOct 26, 2016
  59. Junio C HamanoOct 26, 2016
  60. Duy NguyenOct 25, 2016
  61. Christian CouderNov 3, 2016
  62. Duy NguyenNov 7, 2016
  63. Christian CouderNov 18, 2016
  64. Duy NguyenNov 22, 2016
  65. Christian CouderNov 22, 2016
  66. Duy NguyenNov 22, 2016

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.