In the current setup, the response stream is parsed by the JSON decoder, which throws an exception due to reading a non-json formatted error message.
The reported exception simply states that the first character on the first line was not valid json, which is true, but does not help diagnose the problem.
In many cases this is a human readable message, such as "over quota", "permission denied", etc.
This update adds a stream that keeps the first 2kb of the response in an internal buffer, which can then be printed in case the JSON parsing fails.
Most of the added code is just simple redirects for calling the base stream in the peeking stream.
Previously, the value of the LastRun field in the Schedule table was
updated to be (approximately) the time that the job was added to the
worker's list of tasks. However, if the backup was missed (via pause or
system suspend), this value would be incorrect. If the next scheduled
backup was also missed, then after the backup was finally run, the
computed next start time would be based on the (incorrect) last run time
of the first missed backup. This would then immediately trigger an
unnecessary second backup.
Now, we add a handler to the StartingWork event to set a more accurate
value for the LastRun field in the Schedule table.
This fixes issue #2249.
Although these are not needed for the Linux and OS X packages, it
appears that there are times when this dependency is woken up, possibly
due to issues regarding caching and static initialization of the
VssBackupComponents._vssBackupComponents field.
This fixes#4149.
The index on Block.Size improves the performance of the query that
checks that the user has not altered the block size of the backup
configuration.
The index on Block.Hash and Block.VolumeID improves the performance of
the query that obtains the blocklists.
There are anecdotes that these indices can drastically improve
performance (queries that used to take hours completed in seconds with
the index):
https://forum.duplicati.com/t/repairing-a-big-database/8174/4https://github.com/duplicati/duplicati/issues/3884#issuecomment-612296016
This fixes issue #3884.
The last references were removed in 5170c6ad1d ("Remove unused
CommonStrings class"), but the last real usages were removed in revision
62c75d9af9 ("Removed all informs code (no more 1.3.x UI)").