fix(FN-4423): add missing weight property to planShardAssignments output

Both ternary branches in planShardAssignments() omitted weight from the
pushed entry objects despite using entry.weight for bin-packing. Downstream
consumers that relied on shard entry weight (e.g., balance verification)
had to reconstruct it from computeSplitPlan output.
This commit is contained in:
gsxdsm
2026-05-13 22:18:01 -07:00
parent 48eb88ec4f
commit 02adf013f8

View File

@@ -172,7 +172,8 @@ export function planShardAssignments(packages, total, options = {}) {
name: entry.name, name: entry.name,
shardIndex: entry.shardIndex, shardIndex: entry.shardIndex,
shardCount: entry.shardCount, shardCount: entry.shardCount,
} : { name: entry.name }); weight: entry.weight,
} : { name: entry.name, weight: entry.weight });
shardWeights[targetIndex] += entry.weight; shardWeights[targetIndex] += entry.weight;
} }