D477: revlog: add option to mmap revlog index
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed Sep 20 12:03:45 EDT 2017
durin42 requested changes to this revision.
durin42 added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> revlog.py:348
> + self.opener.fstat(f).st_size >= mmapindexthreshold):
> + indexdata = util.buffer(util.mmapread(f))
> + else:
This makes me very uncomfortable, because util.mmapread() returns the empty string if it doesn't like the file descriptor. I'd be less worried if util.mmapread() crashed, or if this was more cautious about the mmapread failing for some reason.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D477
To: mbthomas, #fbhgext, indygreg, #hg-reviewers, durin42, quark
Cc: durham, quark, durin42, simonfar, mercurial-devel
More information about the Mercurial-devel
mailing list