This PR adds a few extra consistency checks to the database, so any failure in the operations is detected earlier than before.
Especially when cleaning temporary and partial files, it is important that the deletes do not remove unexpected entries.
Also, after a recreate, repair or purge command, the database consistency is verified, so it becomes easier to identify which operation caused the failure.
To assist in trouble shooting, there is also a more elaborate error message if a fileset discrepancy is detected, that pinpoints which versions are affected.
Finally, the repair command has been extended to support recreating a fileset from the remote data.
If the user selects the blocksize to be the same as the remote volume size, this will cause each block to be in a separate volume and will trigger repeated compact calls.
This commit adds a check that ensures the volume size is large enough to hold at least two blocks.
Also fixed an issue where the compact could create volumes larger than the set limit (at most one block larger).
Since the core changes in the cancelation process where now cancellationTokens are observed rather than a thread.abort attempt, the expected exception is now OperationCanceledException when calling .Abort on the controller.
Also eliminated the time based awaiting to abort in favor of monitoring the backup phase to ensure the .Abort happens after the controller has had time to initiate the backend and backend is at Backup_ProcessingFiles state.
This adds a test with a failed upload.
The failed upload is done in parallel, so (at least) one of the uploads succeeeds and one upload fails.
The backup then errors, but a subsequent backup continues without errors and creates a synthetic filelist.
Also refactored the DeterministicErrorBackend to not use magic strings.
And made it actually deterministic.
This PR is the final change, where all backends are now purely implemented with async interfaces.
The code changes here replace the LIST call with an async version. This affect all backends (and then some) but the changes are mostly mechanical rewrites of the code.
In many places, the backeds were already prepared for async output, in other some glue was needed.
To reduce the scope of this change, some backends simply report a synchronous result as an async list.