pub fn apply_fuel(&mut self, fuel: &mut isize) {
        // For the moment our strategy is to apply fuel independently to each merge
        // in progress, rather than prioritizing small merges. This sounds like a
        // great idea, but we need better accounting in place to ensure that merges
        // that borrow against later layers but then complete still "acquire" fuel
        // to pay back their debts.
        for index in 0..self.merging.len() {
            // Give each level independent fuel, for now.
            let mut fuel = *fuel;
            // Pass along various logging stuffs, in case we need to report success.
            self.merging[index].work(&mut fuel);
            // `fuel` could have a deficit at this point, meaning we over-spent when
            // we took a merge step. We could ignore this, or maintain the deficit
            // and account future fuel against it before spending again. It isn't
            // clear why that would be especially helpful to do; we might want to
            // avoid overspends at multiple layers in the same invocation (to limit
            // latencies), but there is probably a rich policy space here.

            // If a merge completes, we can immediately merge it in to the next
            // level, which is "guaranteed" to be complete at this point, by our
            // fueling discipline.
            if self.merging[index].is_complete() {
                let complete = self.complete_at(index);
                self.insert_at(complete, index + 1);
            }
        }
    }
/// Applies an amount of fuel to merges in progress.
///
/// The supplied `fuel` is for each in progress merge, and if we want to
/// spend the fuel non-uniformly (e.g. prioritizing merges at low
/// layers) we could do so in order to maintain fewer batches on average
/// (at the risk of completing merges of large batches later, but tbh
/// probably not much later).
Applies an amount of fuel to merges in progress.
The supplied `fuel` is for each in progress merge, and if we want to
spend the fuel non-uniformly  we could do so in order to maintain fewer batches on average
(at the risk of completing merges of large batches later, but tbh
probably not much later).
Applies an amount of fuel to merges in progress . The supplied ` fuel ` is for each in progress merge and if we want to spend the fuel non - uniformly we could do so in order to maintain fewer batches on average ( at the risk of completing merges of large batches later but tbh probably not much later ) .
pub fn apply_fuel(&mut self, fuel: &mut isize) {
        // For the moment our strategy is to apply fuel independently to each merge
        // in progress, rather than prioritizing small merges. This sounds like a
        // great idea, but we need better accounting in place to ensure that merges
        // that borrow against later layers but then complete still "acquire" fuel
        // to pay back their debts.
        for index in 0..self.merging.len() {
            // Give each level independent fuel, for now.
            let mut fuel = *fuel;
            // Pass along various logging stuffs, in case we need to report success.
            self.merging[index].work(&mut fuel);
            // `fuel` could have a deficit at this point, meaning we over-spent when
            // we took a merge step. We could ignore this, or maintain the deficit
            // and account future fuel against it before spending again. It isn't
            // clear why that would be especially helpful to do; we might want to
            // avoid overspends at multiple layers in the same invocation (to limit
            // latencies), but there is probably a rich policy space here.
            // If a merge completes, we can immediately merge it in to the next
            // level, which is "guaranteed" to be complete at this point, by our
            // fueling discipline.
            if self.merging[index].is_complete() {
                let complete = self.complete_at(index);
                self.insert_at(complete, index + 1);
            }
        }
    }
pub fn apply_fuel ( & mut self , fuel : & mut isize ) { // For the moment our strategy is to apply fuel independently to each merge // in progress, rather than prioritizing small merges. This sounds like a // great idea, but we need better accounting in place to ensure that merges // that borrow against later layers but then complete still "acquire" fuel // to pay back their debts. for index in 0 .. self . merging . len ( ) { // Give each level independent fuel, for now. let mut fuel = * fuel ; // Pass along various logging stuffs, in case we need to report success. self . merging [ index ] . work ( & mut fuel ) ; // `fuel` could have a deficit at this point, meaning we over-spent when // we took a merge step. We could ignore this, or maintain the deficit // and account future fuel against it before spending again. It isn't // clear why that would be especially helpful to do; we might want to // avoid overspends at multiple layers in the same invocation (to limit // latencies), but there is probably a rich policy space here. // If a merge completes, we can immediately merge it in to the next // level, which is "guaranteed" to be complete at this point, by our // fueling discipline. if self . merging [ index ] . is_complete ( ) { let complete = self . complete_at ( index ) ; self . insert_at ( complete , index + 1 ) ; } } }
Applies an amount of fuel to merges in progress.
Applies an amount of fuel to merges in progress .
&mut self
fuel
&mut isize