Skip to content

Commit

Permalink
SelectColumnLayer to parallelization fixes (#3181)
Browse files Browse the repository at this point in the history
* SelectColumnLayer to only allow cross-column parallelization if its SelectColumn is stateless

* Change SelectColumnLayer to test the reinterpreted writable source, rather than the input, for WritableSourceWithPrepareForParallelPopulation.supportsParallelPopulation
  • Loading branch information
rcaudy authored Dec 11, 2022
1 parent dc5788b commit c659740
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ final public class SelectColumnLayer extends SelectOrViewColumnLayer {
// We can only parallelize this column if we are not redirected, our destination provides ensure previous, and
// the select column is stateless
canParallelizeThisColumn = !isRedirected
&& WritableSourceWithPrepareForParallelPopulation.supportsParallelPopulation(ws) && sc.isStateless();
&& WritableSourceWithPrepareForParallelPopulation.supportsParallelPopulation(writableSource)
&& sc.isStateless();

// If we were created on a systemic thread, we want to be sure to make sure that any updates are also
// applied systemically.
Expand Down Expand Up @@ -576,6 +577,6 @@ public LogOutput append(LogOutput logOutput) {

@Override
public boolean allowCrossColumnParallelization() {
return inner.allowCrossColumnParallelization();
return selectColumn.isStateless() && inner.allowCrossColumnParallelization();
}
}

0 comments on commit c659740

Please sign in to comment.