Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff
- From
David Turner <dturner@twopensource.com>
- Date
- Apr 20, 2016, 19:38 UTC
- Message-ID
- <1461181137.5540.167.camel@twopensource.com>
- In-Reply-To
- <alpine.DEB.2.20.1604201349590.2826@virtualbox>
On Wed, 2016-04-20 at 14:17 +0200, Johannes Schindelin wrote:
Show 19 quoted lines
> Hi Dave, > > (apologies in advance if I may bring up anything that has been > discussed > in earlier iterations; I simply was too busy with the rebase--helper > project to even look.) > > On Tue, 19 Apr 2016, David Turner wrote: > > > Shared memory is done by storing files in a per-repository > > temporary > > directory. This is more portable than shm (which requires > > posix-realtime and has various quirks on OS X). It might even work > > on > > Windows, although this has not been tested. The shared memory > > file's > > name folows the template "shm-<object>-<SHA1>" where <SHA1> is the > > s/folows/follows/
Will fix, thanks.
> And: now that it is no longer shared memory, should we not do away > with > the "shm-" prefix?
Hm. It's intended to be shared via MAP_SHARED. So it is just a "disk -backed" shared memory object instead of a POSIX shm object.
Show 5 quoted lines
> > + if (*new_mmap == MAP_FAILED) {
> > + *new_mmap = NULL;
> > + goto done;
>
> Shouldn't we provide some sort of error message here?We generally try to fail silently on index-helper failures -- the user isn't necessarily expecting output at that point, and we can always fall back to directly reading the index.
On the other hand, this error should pretty much never happen, so maybe it's worth calling out?