Wed, 01 Mar 2023 00:07:26 +0100 dirstate: simplify the dirstate's read race testing stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 01 Mar 2023 00:07:26 +0100] rev 49698
dirstate: simplify the dirstate's read race testing Now that most code behaves properly, we can simplify the expected matching.
Tue, 28 Feb 2023 19:36:46 +0100 dirstate: deal with read-race for pure rust code path (rhg) stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 28 Feb 2023 19:36:46 +0100] rev 49697
dirstate: deal with read-race for pure rust code path (rhg) If we cannot read the dirstate data, this is probably because a writing process wrote it under our feet. So refresh the docket and try again a handful of time.
Tue, 28 Feb 2023 23:35:52 +0100 dirstate: deal with read-race for python code using rust object stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 28 Feb 2023 23:35:52 +0100] rev 49696
dirstate: deal with read-race for python code using rust object If we cannot read the dirstate data, this is probably because a writing process wrote it under our feet. So refresh the docket and try again a handful of time.
Tue, 28 Feb 2023 19:01:20 +0100 dirstate: deal with read-race for pure python code stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 28 Feb 2023 19:01:20 +0100] rev 49695
dirstate: deal with read-race for pure python code If we cannot read the dirstate data, this is probably because a writing process wrote it under our feet. So refresh the docket and try again a handful of time.
Wed, 01 Mar 2023 16:05:28 +0100 dirstate: abstract the reading of the data file in v2 in a method stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 01 Mar 2023 16:05:28 +0100] rev 49694
dirstate: abstract the reading of the data file in v2 in a method We will need more changes to avoid some race conditions during read, so we first isolate the simple logic before making it more complicated.
Mon, 27 Feb 2023 03:14:30 +0100 dirstate: add append/new-file variants in the dirstate's read race tests stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 27 Feb 2023 03:14:30 +0100] rev 49693
dirstate: add append/new-file variants in the dirstate's read race tests This covers more ground and finds more bugs. At that point I gave up on making things as `known-bad-output` / `missing-correct-output` as this gets too messy.
Tue, 13 Dec 2022 14:51:36 +0100 dirstate: add a synchronisation point in the middle of the read stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 13 Dec 2022 14:51:36 +0100] rev 49692
dirstate: add a synchronisation point in the middle of the read This will be useful to test some more race conditions around dirstate.
Sun, 26 Feb 2023 16:27:50 +0100 dirstate: add v1-v2 variants to the dirstate's read race tests stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 26 Feb 2023 16:27:50 +0100] rev 49691
dirstate: add v1-v2 variants to the dirstate's read race tests More cases mean different issues.
Sun, 26 Feb 2023 08:17:23 +0100 dirstate: check dirstate race condition around status stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 26 Feb 2023 08:17:23 +0100] rev 49690
dirstate: check dirstate race condition around status More problems to solve.
Sun, 26 Feb 2023 07:08:16 +0100 dirstate: check dirstate race condition around update stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 26 Feb 2023 07:08:16 +0100] rev 49689
dirstate: check dirstate race condition around update More problems to solve.
Sun, 26 Feb 2023 07:02:13 +0100 dirstate: check dirstate race condition around commit stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 26 Feb 2023 07:02:13 +0100] rev 49688
dirstate: check dirstate race condition around commit Once in a while, rhg is the only one to behave right here.
Sat, 25 Feb 2023 00:54:30 +0100 dirstate: initial creation of a test file to check dirstate race read stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Feb 2023 00:54:30 +0100] rev 49687
dirstate: initial creation of a test file to check dirstate race read More problems to solve… yeah ! (I guess)
Sat, 25 Feb 2023 01:07:44 +0100 dirstate: add a synchronisation point before doing a full dirstate read stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Feb 2023 01:07:44 +0100] rev 49686
dirstate: add a synchronisation point before doing a full dirstate read This will be useful to test some race conditions around the dirstate.
Tue, 28 Feb 2023 12:15:19 +0100 rust-repo: move dirstate-v2 opening to a separate method stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Feb 2023 12:15:19 +0100] rev 49685
rust-repo: move dirstate-v2 opening to a separate method The next changeset will make changes to this logic, it helps to have it in order first.
Tue, 28 Feb 2023 16:19:21 +0100 rhg: fix race when an ambiguous file is deleted on disk stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Feb 2023 16:19:21 +0100] rev 49684
rhg: fix race when an ambiguous file is deleted on disk There are two places in the status code where we handle files whose status we are unsure of based off of metadata alone: this one is the first one to actually disambiguate, and the second one is later in the code (but updated in the previous commit) for files that are actually clean to update the dirstate. Since there is a chance that the contents have changed between those two moments, we need to stat the files again, since re-using the old stat could lie about the clean state of the file.
Mon, 27 Feb 2023 15:18:50 +0100 rhg: fix race when a fixup file is deleted on disk stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 27 Feb 2023 15:18:50 +0100] rev 49683
rhg: fix race when a fixup file is deleted on disk See next changeset for the other race in the same kind of logic and why there are two different places.
Sat, 25 Feb 2023 06:11:14 +0100 dirstate: test a `hg status` raced by a `hg remove` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Feb 2023 06:11:14 +0100] rev 49682
dirstate: test a `hg status` raced by a `hg remove` This shows that `rhg` is misbehaving here.
Fri, 24 Feb 2023 01:19:37 +0100 dirstate: tests racing status with both dirstate-v2 append and rewrite stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 01:19:37 +0100] rev 49681
dirstate: tests racing status with both dirstate-v2 append and rewrite The way the racing process touches the dirstate results in different challenges for the raced process. We now test each variant in the `test-dirstate-status-race.t` tests.
Tue, 28 Feb 2023 15:49:53 +0100 dirstate-v2: add devel config option to control write behavior stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Feb 2023 15:49:53 +0100] rev 49680
dirstate-v2: add devel config option to control write behavior This will help us to write predictable tests checking behavior in each case.
Fri, 24 Feb 2023 18:21:54 +0100 dirstate: use more than a bool to control append behavior stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 18:21:54 +0100] rev 49679
dirstate: use more than a bool to control append behavior When writing dirstate-v2, we might either append to the existing file, or create a new file. We are about to introduce some configuration to control this behavior. As a prelude, we change the current way the behavior was automatically controlled to make the change smaller/clearer.
Fri, 24 Feb 2023 01:15:45 +0100 dirstate: cover each dirstate version when testing for status race stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 01:15:45 +0100] rev 49678
dirstate: cover each dirstate version when testing for status race Previously we were only testing it with the default (dirstate-v1 currently). Now we explicitly test each variant.
Fri, 24 Feb 2023 01:09:11 +0100 dirstate: test a `hg status` raced by another `hg status` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 01:09:11 +0100] rev 49677
dirstate: test a `hg status` raced by another `hg status` This shows that `rhg` is misbehaving here.
Fri, 24 Feb 2023 01:01:04 +0100 dirstate: test a `hg status` raced by a `hg update` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 01:01:04 +0100] rev 49676
dirstate: test a `hg status` raced by a `hg update` This shows that `rhg` is misbehaving here.
Fri, 24 Feb 2023 00:55:13 +0100 dirstate: test a `hg status` raced by a `hg commit` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 00:55:13 +0100] rev 49675
dirstate: test a `hg status` raced by a `hg commit` This shows that `rhg` is misbehaving here.
Fri, 24 Feb 2023 16:12:01 +0100 dirstate: test a `hg status` raced by a `hg add` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 24 Feb 2023 16:12:01 +0100] rev 49674
dirstate: test a `hg status` raced by a `hg add` This shows that `rhg` is misbehaving here.
Tue, 28 Feb 2023 15:25:47 +0100 dirstate: add a way to test races happening during status stable
Raphaël Gomès <rgomes@octobus.net>, Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 28 Feb 2023 15:25:47 +0100] rev 49673
dirstate: add a way to test races happening during status We add the `devel.sync.status.pre-dirstate-write-file` config option to easily test what happens when other operations happen during the window where `hg status` is done working but has not updated the cache on disk yet. We introduce the framework for testing such races too, actual tests will be added in the next changesets. For now the test is only checking dirstate-v1. We will extend the test coverage later too. Check test documentation for details. Code change from Raphaël Gomès <rgomes@octobus.net> Test change from Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 28 Feb 2023 00:01:41 +0100 testing: introduce util function to synchronize concurrent commands on files stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Feb 2023 00:01:41 +0100] rev 49672
testing: introduce util function to synchronize concurrent commands on files This is an extension of mechanisms that the tests have been using for a while. To be able to also control the execution in Rust, we introduce utility to perform such `wait_on_file` logic based on some configuration value. This will be used in the tests introduced in the next changesets.
Tue, 28 Feb 2023 00:04:32 +0100 dirstate: add some debug output when writing the dirstate stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 28 Feb 2023 00:04:32 +0100] rev 49671
dirstate: add some debug output when writing the dirstate This helps debugging Mercurial behavior in the dirstate-v2 case.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 tip