Show More
@@ -144,6 +144,21 b' class storecache(_basefilecache):' | |||||
144 | return obj.sjoin(fname) |
|
144 | return obj.sjoin(fname) | |
145 |
|
145 | |||
146 |
|
146 | |||
|
147 | class changelogcache(storecache): | |||
|
148 | """filecache for the changelog""" | |||
|
149 | ||||
|
150 | def __init__(self): | |||
|
151 | super(changelogcache, self).__init__() | |||
|
152 | _cachedfiles.add((b'00changelog.i', b'')) | |||
|
153 | _cachedfiles.add((b'00changelog.n', b'')) | |||
|
154 | ||||
|
155 | def tracked_paths(self, obj): | |||
|
156 | paths = [self.join(obj, b'00changelog.i')] | |||
|
157 | if obj.store.opener.options.get(b'persistent-nodemap', False): | |||
|
158 | paths.append(self.join(obj, b'00changelog.n')) | |||
|
159 | return paths | |||
|
160 | ||||
|
161 | ||||
147 | class mixedrepostorecache(_basefilecache): |
|
162 | class mixedrepostorecache(_basefilecache): | |
148 | """filecache for a mix files in .hg/store and outside""" |
|
163 | """filecache for a mix files in .hg/store and outside""" | |
149 |
|
164 | |||
@@ -1673,13 +1688,13 b' class localrepository(object):' | |||||
1673 | def obsstore(self): |
|
1688 | def obsstore(self): | |
1674 | return obsolete.makestore(self.ui, self) |
|
1689 | return obsolete.makestore(self.ui, self) | |
1675 |
|
1690 | |||
1676 | @storecache(b'00changelog.i') |
|
1691 | @changelogcache() | |
1677 |
def changelog( |
|
1692 | def changelog(repo): | |
1678 | # load dirstate before changelog to avoid race see issue6303 |
|
1693 | # load dirstate before changelog to avoid race see issue6303 | |
1679 |
|
|
1694 | repo.dirstate.prefetch_parents() | |
1680 |
return |
|
1695 | return repo.store.changelog( | |
1681 |
txnutil.mayhavepending( |
|
1696 | txnutil.mayhavepending(repo.root), | |
1682 |
concurrencychecker=revlogchecker.get_checker( |
|
1697 | concurrencychecker=revlogchecker.get_checker(repo.ui, b'changelog'), | |
1683 | ) |
|
1698 | ) | |
1684 |
|
1699 | |||
1685 | @storecache(b'00manifest.i') |
|
1700 | @storecache(b'00manifest.i') |
@@ -748,19 +748,19 b' read/write patterns.' | |||||
748 | docket-details: |
|
748 | docket-details: | |
749 | uid: 43c37dde |
|
749 | uid: 43c37dde | |
750 | actual-tip: 5006 |
|
750 | actual-tip: 5006 | |
751 |
tip-rev: 500 |
|
751 | tip-rev: 5006 | |
752 |
data-length: 121 |
|
752 | data-length: 121280 | |
753 | right ready to write, waiting for reader |
|
753 | right ready to write, waiting for reader | |
754 | right proceeding with writing its changelog index and nodemap |
|
754 | right proceeding with writing its changelog index and nodemap | |
755 | finalized changelog write |
|
755 | finalized changelog write | |
756 | persisting changelog nodemap |
|
756 | persisting changelog nodemap | |
757 |
new data start at 121 |
|
757 | new data start at 121280 | |
758 | persisted changelog nodemap |
|
758 | persisted changelog nodemap | |
759 | docket-details: |
|
759 | docket-details: | |
760 | uid: 43c37dde |
|
760 | uid: 43c37dde | |
761 | actual-tip: 5007 |
|
761 | actual-tip: 5007 | |
762 | tip-rev: 5007 |
|
762 | tip-rev: 5007 | |
763 |
data-length: 121 |
|
763 | data-length: 121536 | |
764 | $ sh "$RUNTESTDIR"/testlib/wait-on-file 10 sync-files/reader-done |
|
764 | $ sh "$RUNTESTDIR"/testlib/wait-on-file 10 sync-files/reader-done | |
765 | $ cat outputs/reader.txt |
|
765 | $ cat outputs/reader.txt | |
766 | reader: reading changelog |
|
766 | reader: reading changelog | |
@@ -768,7 +768,7 b' read/write patterns.' | |||||
768 | reader: nodemap docket read |
|
768 | reader: nodemap docket read | |
769 | record-data-length: 121280 |
|
769 | record-data-length: 121280 | |
770 | actual-data-length: 121280 |
|
770 | actual-data-length: 121280 | |
771 |
file-actual-length: 121 |
|
771 | file-actual-length: 121536 | |
772 | reader: changelog read |
|
772 | reader: changelog read | |
773 | docket-details: |
|
773 | docket-details: | |
774 | uid: 43c37dde |
|
774 | uid: 43c37dde | |
@@ -778,8 +778,6 b' read/write patterns.' | |||||
778 | tip-rev: 5006 |
|
778 | tip-rev: 5006 | |
779 | tip-node: 492901161367 |
|
779 | tip-node: 492901161367 | |
780 | node-rev: 5006 |
|
780 | node-rev: 5006 | |
781 | error while checking revision: 18 (known-bad-output !) |
|
|||
782 | Inconsistency: Revision 5007 found in nodemap is not in revlog indexi (known-bad-output !) |
|
|||
783 |
|
781 | |||
784 | $ hg -R ./race-repo log -G -r 'head()' |
|
782 | $ hg -R ./race-repo log -G -r 'head()' | |
785 | o changeset: 5007:ac4a2abde241 |
|
783 | o changeset: 5007:ac4a2abde241 |
General Comments 0
You need to be logged in to leave comments.
Login now