perf(bake): stream catalog and bound validation residency

This commit is contained in:
Erik 2026-07-24 14:05:30 +02:00
parent b7b9aaa9dd
commit 90bf6bbf45
7 changed files with 217 additions and 84 deletions

View file

@ -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;
}