Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

docs(render-farm): explain why short chunks are stashed whole

Richie McIlroya4fe90e79394
diff --git a/apps/render-farm/src/stitch.ts b/apps/render-farm/src/stitch.ts
index 5ee76932c..ec5f1fe60 100644
--- a/apps/render-farm/src/stitch.ts
+++ b/apps/render-farm/src/stitch.ts
@@ -31,7 +31,10 @@ export type StitchPart = {
export const HEADER_PART = 1;
-/** Bytes of a chunk that go into its stash rather than its own parts. */
+/**
+ * A chunk under two minimum parts can't stash one and still upload a valid
+ * part from the rest, so all of it is stashed.
+ */
export function stashBytes(chunkBytes: number) {
return chunkBytes < 2 * MIN_PART ? chunkBytes : MIN_PART;
}