git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Christian Couder" <chriscool@tuxfamily.org>
Subject: Re: [RFC/PATCH 8/8] read-cache: unlink old sharedindex files
Date: Tue, 12 Jul 2016 09:04:52 +0200	[thread overview]
Message-ID: <CAP8UFD01MiMnz6qNGYa9WEjZ_EOy-hBqO4gGKGyxUc71aOyp4w@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8BqMFASHf5kJgUh+bd7XG98CafNydE964VJyPXz-emEvA@mail.gmail.com>

On Mon, Jul 11, 2016 at 8:27 PM, Duy Nguyen <pclouds@gmail.com> wrote:
> On Mon, Jul 11, 2016 at 7:22 PM, Christian Couder
> <christian.couder@gmail.com> wrote:
>> Everytime split index is turned on, it creates a "sharedindex.XXXX"
>> file in the git directory. This makes sure that old sharedindex
>> files are removed after a new one has been created.
>
> Hmm it's one-way link, we don't know how many index files use this
> shared index file, how can you be sure nobody else will need it? I'm
> thinking about temporary indexes. If a temp index is created, saved on
> disk, and use delete the shared index file, the real, main index may
> become useless. Temp index will most likely replace the main index
> (git commit) but if a failure happens, we can't fall back.

Isn't there a way to scan all the current indexes (temp or not) to see
which shared indexes they need?

> A safer approach is "touch" the shared index every time a linked index
> is used, then we can delete shared indexes with old mtime, older than
> a grace period, in git-prune (or here).

Maybe old linked indexes could be converted after some time to use a
newer shared index, so that we can get rid of the old shared indexes.
That seems safer than just deleting old linked indexes.

Thanks for your review,
Christian.

  reply	other threads:[~2016-07-12  7:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11 17:22 [RFC/PATCH 0/8] Add configuration options for split-index Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 1/8] config: add git_config_get_split_index() Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 2/8] split-index: add {add,remove}_split_index() functions Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 3/8] read-cache: add and then use tweak_split_index() Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 4/8] update-index: warn in case of split-index incoherency Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 5/8] Documentation/config: add information for core.splitIndex Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 6/8] Documentation/git-update-index: talk about core.splitIndex config var Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 7/8] t1700: add tests for core.splitIndex Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 8/8] read-cache: unlink old sharedindex files Christian Couder
2016-07-11 18:27   ` Duy Nguyen
2016-07-12  7:04     ` Christian Couder [this message]
2016-07-12 15:12       ` Duy Nguyen
2016-07-12 19:45         ` Christian Couder
2016-07-13 15:16           ` Duy Nguyen
2016-07-13 17:54             ` Christian Couder
2016-07-12 16:01 ` [RFC/PATCH 0/8] Add configuration options for split-index Duy Nguyen
2016-07-23 16:11   ` Christian Couder
2016-07-25 16:04     ` Duy Nguyen
2016-07-25 21:18       ` Christian Couder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP8UFD01MiMnz6qNGYa9WEjZ_EOy-hBqO4gGKGyxUc71aOyp4w@mail.gmail.com \
    --to=christian.couder@gmail.com \
    --cc=avarab@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).