sim: Fix size tracking for balanced preferred content

This commit is contained in:
Joey Hess 2024-09-23 12:28:18 -04:00
parent a6b8082119
commit 6cf9a101b8
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 98 additions and 32 deletions

View file

@ -185,11 +185,14 @@ as passed to "git annex sim" while a simulation is running.
On each step of the simulation, one file is either transferred
or dropped, according to the preferred content and other configuration.
If there are no more files that can be either transferred or dropped
according to the current configuration, a message will be displayed
to indicate that the simulation has stabilized.
(A step also simulates git pull and git push being run in each repository,
to all of its remotes. That happens before the file transfer or drop.)
* `action repo getwanted remote`
Simulate the repository getting files it wants from the remote.

View file

@ -82,16 +82,6 @@ notpresent bar 9testfile
step 1
present bar 9testfile
* sim: For size balanced preferred content to work, getLiveRepoSizes
needs to reflect keys that were added/dropped from the repository by
earlier stages of the sim. That is not currently done, because
NoLiveUpdate is used, and the structure of the sim prevents using the
usual live update machinery. And live updates are not needed because the
sim only ever actually runs one action at a time.
What could be done is, at each simulated get/drop of a key in a simulated
repo, update the SizeChanges table in its database accordingly.
* sim: Can a cluster using size balanced preferred content be simulated?
May need the sim to get the concept of a cluster gateway, since the
gateway is what picks amoung the nodes on the basis of size. On the other
@ -143,6 +133,11 @@ present bar 9testfile
* sim: Add support for metadata, so preferred content that matches on it
will work
* The sim cannot be safely interrupted, or two processes be run
concurrently. Both unlike other git-annex commands. Either document these
limitations, or add locking and make it detect when it was interrupted
and re-run the sim from the start to resume.
## items deferred until later for balanced preferred content and maxsize tracking
* `git-annex assist --rebalance` of `balanced=foo:2`