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:
@@ -172,7 +172,8 @@ export function planShardAssignments(packages, total, options = {}) {
|
||||
name: entry.name,
|
||||
shardIndex: entry.shardIndex,
|
||||
shardCount: entry.shardCount,
|
||||
} : { name: entry.name });
|
||||
weight: entry.weight,
|
||||
} : { name: entry.name, weight: entry.weight });
|
||||
shardWeights[targetIndex] += entry.weight;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user