Skip to content

Conversation

keith-turner
Copy link
Contributor

Updates tablet locations using conditional mutations. Two supporting changes were made and one bug was fixes while making this change.

The first supporting change was streamlining handling of conditional mutations with a result of UNKNOWN. An UNKNOWN result on a conditional mutation occurs when the RPC for the conditional mutation has an error. In this case the conditional mutation may or may not have gone through. The tablet must be read to know what happened. This update adds support for automatically reading the tablet and checking it via a lambda. This makes it easy to write code for handling the unknown case.

The second supporting change was combining code that was mostly the same in ZooTabletStateStore and MetaDataStateStore by making both extend AbstractStateStore and use common code. This change allowed the updates to use conditional mutations to be made in one place instead of two.

The bug was with the new conditional writer code, it only supported writing tablets of the same table. The code was changed to only require that tablets be on the same datalevel. This change allowed ITs that create multiple tables to run.

Some places in the code that set locations were not changed to use conditional mutations. Comments were placed in the code for these.

Updates tablet locations using conditional mutations. Two supporting changes
were made and one bug was fixes while making this change.

The first supporting change was streamlining handling of conditional mutations
with a result of UNKNOWN.  An UNKNOWN result on a conditional mutation occurs
when the RPC for the conditional mutation has an error.  In this case the
conditional mutation may or may not have gone through. The tablet must be read
to know what happened.  This update adds support for automatically reading the
tablet and checking it via a lambda. This makes it easy to write code for
handling the unknown case.

The second supporting change was combining code that was mostly the same in
ZooTabletStateStore and MetaDataStateStore by making both extend
AbstractStateStore and use common code.  This change allowed the updates to use
conditional mutations to be made in one place instead of two.

The bug was with the new conditional writer code, it only supported writing
tablets of the same table.  The code was changed to only require that tablets
be on the same datalevel.  This change allowed ITs that create multiple tables
to run.

Some places in the code that set locations were not changed to use conditional
mutations.  Comments were placed in the code for these.
@keith-turner keith-turner requested a review from dlmarion April 18, 2023 18:37
@keith-turner keith-turner merged commit 950c806 into apache:elasticity May 2, 2023
@ctubbsii ctubbsii added this to the 4.0.0 milestone 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

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants