elephant-bird icon indicating copy to clipboard operation
elephant-bird copied to clipboard

SplitUtils consistently misnames min as maxCombinedSplitSize

Open gerashegalov opened this issue 10 years ago • 4 comments

the logic in SplitUtils#getCombinedSplits clearly treats maxCombinedSplitSize as the min, and the actual split size may well exceed it.

gerashegalov avatar Oct 22 '15 18:10 gerashegalov

I guess it's poorly named, I think it's more like "target split size, but you may go over it if the last split to be combined is bigger" or something like that, right?

isnotinvain avatar Oct 22 '15 20:10 isnotinvain

Last split might be smaller, too.

dvryaboy avatar Oct 22 '15 20:10 dvryaboy

@dvryaboy correct, the last split can be smaller.

gerashegalov avatar Oct 22 '15 20:10 gerashegalov

@dvryaboy @isnotinvain max and min can in theory be both targets. In most situations but a small single split, we keep piling up on a single split as long as we have not reached the min target. Would minTargetSize work to clarify that normally it's a lower bound?

gerashegalov avatar Oct 22 '15 20:10 gerashegalov