This is an archive of the discontinued Mercurial Phabricator instance.

merge: flush any deferred writes before, and after, running any workers

Authored by phillco on Sep 4 2017, 9:42 PM.



Since we fork to create workers, any changes they queue up will be lost after
the worker terminates, so the easiest solution is to have each worker flush
the writes they accumulate--we are close to the end of the merge in any case.

To prevent duplicated writes, we also have the master processs flush before

In an in-memory merge (M2), we'll instead disable the use of workers.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

phillco created this revision.Sep 4 2017, 9:42 PM
phillco updated this revision to Diff 1669.Sep 7 2017, 12:32 PM
phillco updated this revision to Diff 1672.Sep 7 2017, 12:58 PM
quark added a subscriber: quark.Sep 8 2017, 3:16 PM

Just a personal preference: we can add def flushall(self): pass to the other ctx and just call ctx.flushall() without testing isinstance. I guess that's slightly more readable.

Ah, right, I forgot about that. I'll do that and send a new rev.

phillco updated this revision to Diff 1701.Sep 10 2017, 11:55 PM

(Done on both)

This revision was automatically updated to reflect the committed changes.