-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegionedPageStore contexts must not unconditionally supportUnboundedF… #4261
Conversation
@@ -133,11 +143,12 @@ private static long validateMask(final long mask, final String name) { | |||
/** | |||
* A regioned page store for use when the full set of regions and their sizes are known. | |||
*/ | |||
abstract class Static<ATTR extends Any, INNER_ATTR extends ATTR, REGION_TYPE extends Page<INNER_ATTR>> | |||
abstract class Static<ATTR extends Any, INNER_ATTR extends ATTR, REGION_TYPE extends ColumnRegion<INNER_ATTR>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the bound is Page instead of ColumnRegion, we can't interrogate the supportsUnboundedFill method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cosmetic suggestions made only. I'm going to add some work for addressing deferred regions.
* Do the fill contexts produced by this region support unbounded fill? | ||
* @return true if the contexts support unbounded fill; false otherwise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Do the fill contexts produced by this region support unbounded fill? | |
* @return true if the contexts support unbounded fill; false otherwise | |
* Do the {@link FillContext fill contexts} produced by this region support unbounded fill? | |
* | |
* @return {@code true} if the contexts support unbounded fill; {@code false} otherwise |
private Context innerContext; | ||
|
||
public RegionContextHolder(final int chunkCapacity, @Nullable final SharedContext sharedContext) { | ||
|
||
public RegionContextHolder(final int chunkCapacity, @Nullable final SharedContext sharedContext, boolean supportsUnboundedFill) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public RegionContextHolder(final int chunkCapacity, @Nullable final SharedContext sharedContext, boolean supportsUnboundedFill) { | |
public RegionContextHolder( | |
final int chunkCapacity, | |
@Nullable final SharedContext sharedContext, | |
final boolean supportsUnboundedFill) { |
@@ -33,6 +33,8 @@ interface MakeDeferred<ATTR extends Values, REGION_TYPE extends ColumnRegion<ATT | |||
private volatile int regionCount = 0; | |||
private volatile REGION_TYPE[] regions; | |||
|
|||
private volatile boolean allRegionsSupportUnbounded = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private volatile boolean allRegionsSupportUnbounded = true; | |
private volatile boolean allRegionsSupportUnboundedFill = true; |
if (region == null) { | ||
return regions[regionIndex] = nullRegion; | ||
} | ||
allRegionsSupportUnbounded &= region.supportsUnboundedFill(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allRegionsSupportUnbounded &= region.supportsUnboundedFill(); | |
allRegionsSupportUnboundedFill &= region.supportsUnboundedFill(); |
|
||
@Override | ||
public boolean supportsUnboundedFill() { | ||
return allRegionsSupportUnbounded; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return allRegionsSupportUnbounded; | |
return allRegionsSupportUnboundedFill; |
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ill.