A balanced binary [`AggNode`] over the contiguous shard-id range `lo..hi`.
(lo: u32, hi: u32)
| 2002 | foreign_bytes.saturating_add(added).saturating_sub(removed); |
| 2003 | let tentative = predicted(member_cost.saturating_add(bc), tent_fbytes); |
| 2004 | |
| 2005 | // Open a new shard when the current one is non-empty and `b` won't fit. The |
| 2006 | // first block of a run always goes in (a lone over-cap block is flagged |
| 2007 | // infeasible below, not split — it can't be). |
| 2008 | if !members.is_empty() && tentative > max_cycles { |
| 2009 | max_shard_steps = |
| 2010 | max_shard_steps.max(predicted(member_cost, foreign_bytes)); |
| 2011 | cur += 1; |
| 2012 | members.clear(); |
| 2013 | foreign.clear(); |
| 2014 | member_cost = 0; |
| 2015 | foreign_bytes = 0; |
| 2016 | } |
| 2017 | |
| 2018 | // Commit `b` into the current shard. |
no outgoing calls
no test coverage detected