Patchwork D7837: nodemap: only use persistent nodemap for non-inlined revlog

login
register
mail settings
Submitter phabricator
Date Feb. 11, 2020, 1:23 a.m.
Message ID <ef813b6fe7125f6bbfd67875f6d05489@localhost.localdomain>
Download mbox | patch
Permalink /patch/45121/
State Not Applicable
Headers show

Comments

phabricator - Feb. 11, 2020, 1:23 a.m.
Closed by commit rHGdaad3aace942: nodemap: only use persistent nodemap for non-inlined revlog (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7837?vs=19885&id=20105

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7837/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7837

AFFECTED FILES
  mercurial/revlog.py
  mercurial/revlogutils/nodemap.py

CHANGE DETAILS




To: marmoute, indygreg, #hg-reviewers, martinvonz
Cc: mercurial-devel

Patch

diff --git a/mercurial/revlogutils/nodemap.py b/mercurial/revlogutils/nodemap.py
--- a/mercurial/revlogutils/nodemap.py
+++ b/mercurial/revlogutils/nodemap.py
@@ -34,6 +34,8 @@ 
 
     (only actually persist the nodemap if this is relevant for this revlog)
     """
+    if revlog._inline:
+        return  # inlined revlog are too small for this to be relevant
     if revlog.nodemap_file is None:
         return  # we do not use persistent_nodemap on this revlog
     callback_id = b"revlog-persistent-nodemap-%s" % revlog.nodemap_file
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1965,6 +1965,7 @@ 
             # manager
 
         tr.replace(self.indexfile, trindex * self._io.size)
+        nodemaputil.setup_persistent_nodemap(tr, self)
         self._chunkclear()
 
     def _nodeduplicatecallback(self, transaction, node):