Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

cpwright
Copy link
Contributor

@cpwright cpwright commented Aug 1, 2023

…ill.

@cpwright cpwright requested a review from rcaudy August 1, 2023 23:38
@@ -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>>
Copy link
Contributor Author

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.

@rcaudy rcaudy added bug Something isn't working ReleaseNotesNeeded Release notes are needed core Core development tasks labels Aug 1, 2023
@rcaudy rcaudy added this to the July 2023 milestone Aug 1, 2023
Copy link
Member

@rcaudy rcaudy left a 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.

Comment on lines +23 to +24
* Do the fill contexts produced by this region support unbounded fill?
* @return true if the contexts support unbounded fill; false otherwise
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private volatile boolean allRegionsSupportUnbounded = true;
private volatile boolean allRegionsSupportUnboundedFill = true;

if (region == null) {
return regions[regionIndex] = nullRegion;
}
allRegionsSupportUnbounded &= region.supportsUnboundedFill();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
allRegionsSupportUnbounded &= region.supportsUnboundedFill();
allRegionsSupportUnboundedFill &= region.supportsUnboundedFill();


@Override
public boolean supportsUnboundedFill() {
return allRegionsSupportUnbounded;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return allRegionsSupportUnbounded;
return allRegionsSupportUnboundedFill;

Comment on lines +132 to +133


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@cpwright cpwright closed this Aug 2, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working core Core development tasks NoDocumentationNeeded ReleaseNotesNeeded Release notes are needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants