##// END OF EJS Templates
mmap: only use mmap to read revlog persistent nodemap if it is safe...
marmoute -
r52549:21442f87 stable
parent child Browse files
Show More
@@ -74,7 +74,7 b' def persisted_data(revlog):'
74 74 test_race_hook_1()
75 75 try:
76 76 with revlog.opener(filename) as fd:
77 if use_mmap:
77 if use_mmap and revlog.opener.is_mmap_safe(filename):
78 78 try:
79 79 data = util.buffer(util.mmapread(fd, data_length))
80 80 except ValueError:
@@ -205,7 +205,7 b' def persist_nodemap(tr, revlog, pending='
205 205 fd.seek(target_docket.data_length)
206 206 fd.write(data)
207 207 if feed_data:
208 if use_mmap:
208 if use_mmap and revlog.opener.is_mmap_safe(datafile):
209 209 fd.flush()
210 210 new_data = util.buffer(util.mmapread(fd, new_length))
211 211 else:
@@ -238,7 +238,7 b' def persist_nodemap(tr, revlog, pending='
238 238 with revlog.opener(datafile, b'w+') as fd:
239 239 fd.write(data)
240 240 if feed_data:
241 if use_mmap:
241 if use_mmap and revlog.opener.is_mmap_safe(datafile):
242 242 fd.flush()
243 243 new_data = util.buffer(util.mmapread(fd, len(data)))
244 244 else:
General Comments 0
You need to be logged in to leave comments. Login now