Skip to content

Ensure getTabletState() in TabletMetadata does not allow a null extent#4438

Merged
cshannon merged 1 commit intoapache:2.1from
cshannon:fix-get-tablet-state
Apr 6, 2024
Merged

Ensure getTabletState() in TabletMetadata does not allow a null extent#4438
cshannon merged 1 commit intoapache:2.1from
cshannon:fix-get-tablet-state

Conversation

@cshannon
Copy link
Copy Markdown
Contributor

@cshannon cshannon commented Apr 6, 2024

Previously the private reference for the extent inside TabletMetadata was passed to the TabletLocationState constructor inside of getTabletState(). The extent may not have been loaded at this point as it is lazy loaded by the getExtent() method and requires PREV_ROW to have been fetched. This change now uses the getter to make sure we do not inadvertently pass a null extent which is invalid.

I discovered this bug while working on #4437

Previously the private reference for the extent inside TabletMetadata
was passed to the TabletLocationState constructor inside of
getTabletState(). The extent may not have been loaded at this point as
it is lazy loaded by the getExtent() method and requires PREV_ROW to
have been fetched. This change now uses the getter to make sure we do
not inadvertently pass a null extent which is invalid.
@cshannon cshannon requested a review from keith-turner April 6, 2024 18:45
@cshannon cshannon self-assigned this Apr 6, 2024
@cshannon cshannon merged commit 90bcb46 into apache:2.1 Apr 6, 2024
@cshannon
Copy link
Copy Markdown
Contributor Author

cshannon commented Apr 6, 2024

This only applies to 2.1 and main, the issue was refactored away already in elasticity

@cshannon cshannon deleted the fix-get-tablet-state branch April 6, 2024 19:35
@ctubbsii ctubbsii modified the milestones: 3.1.0, 2.1.3 Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants