sped up sim step by about 200%

Noticed that it was quite slow compared with things like action
sendwanted. Guessed that the slowdown is largely due to every step
doing a simulated git pull/push.

So, rather than always doing a pull/push, only do those when no actions
are found without doing a pull/push.

This does mean that step will sometimes experience a split brain
situation, but that seems like a good thing? Because step ought to
explore as many possible scenarios as it reasonably can.
This commit is contained in:
Joey Hess 2024-09-23 15:27:45 -04:00
parent 6df101f8b4
commit 969e6c2747
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 33 additions and 30 deletions

View file

@ -120,11 +120,6 @@ present bar 9testfile
clients having direct connections to the nodes, but not the same when
there are more than 2 clients connected to the 2 gateways.
* sim: Detect instability. This can be done by examining the history,
if a file is added or removed from the same repository repeatedly,
there is probably instability, although it may be an instability that
dampens out later.
* sim: Set a random preferred content expression. Rather than generating a
fully random expression, it would probably be most useful to take a set
of terms and build an expression that randomly combines them with
@ -140,12 +135,6 @@ present bar 9testfile
## items deferred until later for balanced preferred content and maxsize tracking
* `git-annex assist --rebalance` of `balanced=foo:2`
sometimes needs several runs to stabalize.
May not be a bug, needs reproducing and analysis.
Deferred for proving behavior of balanced preferred content stage.
* The assistant is using NoLiveUpdate, but it should be posssible to plumb
a LiveUpdate through it from preferred content checking to location log
updating.

View file

@ -113,3 +113,5 @@ The location log history could be examined at the end of the simulation
to find problems like instability.
[[!tag projects/openneuro]]
> [[done]], see `git-annex sim` command. --[[Joey]]