perf(bake): stream catalog and bound validation residency
This commit is contained in:
parent
b7b9aaa9dd
commit
90bf6bbf45
7 changed files with 217 additions and 84 deletions
|
|
@ -37,10 +37,12 @@ public static class BakeOutputTransaction
|
|||
validateTemporary(temporaryPath, result);
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
if (File.Exists(fullDestination))
|
||||
File.Replace(temporaryPath, fullDestination, null, ignoreMetadataErrors: true);
|
||||
else
|
||||
File.Move(temporaryPath, fullDestination);
|
||||
// Same-volume MoveFileEx/rename is the publication primitive.
|
||||
// File.Replace additionally performs destination metadata/backup
|
||||
// semantics and proved brittle for a validated 28 GiB artifact on
|
||||
// Windows. Move(overwrite:true) changes only the directory entry:
|
||||
// readers observe the complete old file or the complete new file.
|
||||
File.Move(temporaryPath, fullDestination, overwrite: true);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue