fix(backup): transferred backup size for incremental backup

This commit is contained in:
Florent Beauchamp 2023-12-07 13:40:54 +00:00 committed by Julien Fontanet
parent 2634008a6a
commit 7f8ab07692
2 changed files with 7 additions and 2 deletions

View File

@ -204,14 +204,18 @@ export class IncrementalRemoteWriter extends MixinRemoteWriter(AbstractIncrement
// TODO remove when this has been done before the export
await checkVhd(handler, parentPath)
}
transferSize += await adapter.writeVhd(path, deltaExport.streams[`${id}.vhd`], {
// don't write it as transferSize += await async function
// since i += await asyncFun lead to race condition
// as explained : https://eslint.org/docs/latest/rules/require-atomic-updates
const transferSizeOneDisk = await adapter.writeVhd(path, deltaExport.streams[`${id}.vhd`], {
// no checksum for VHDs, because they will be invalidated by
// merges and chainings
checksum: false,
validator: tmpPath => checkVhd(handler, tmpPath),
writeBlockConcurrency: this._config.writeBlockConcurrency,
})
transferSize += transferSizeOneDisk
if (isDelta) {
await chainVhd(handler, parentPath, handler, path)

View File

@ -44,6 +44,7 @@
<!--packages-start-->
- @vates/nbd-client major
- @xen-orchestra/backups patch
- @xen-orchestra/xapi minor
- vhd-lib patch
- xo-server minor