-
Notifications
You must be signed in to change notification settings - Fork 3.8k
strict_mv_consistency implementation #4358
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
base: trunk
Are you sure you want to change the base?
Conversation
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.
I am continuing to review. In the meantime, here are some of the comments.
// When false, it behaves the same as normal streaming. | ||
public volatile boolean materialized_views_on_repair_enabled = true; | ||
|
||
public boolean materialized_view_base_table_metric_collection_enabled = false; |
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.
add this new configurations to config/cassandra_latest.yaml
|
||
for (ModificationStatement statement : statements) | ||
{ | ||
if (DatabaseDescriptor.getMaterializedViewsBasetableMetricCollectionEnabled()) |
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.
These four lines are redundant at multiple places. I think it would be a good idea to create a wrapper for it.
SinglePartitionReadCommand readCommand = null; | ||
if (isAcceptedButNotCommitted && table.strictMVEnabled() && !latestAccepted.update.isEmpty()) | ||
{ | ||
assert latestAccepted.update.rowCount() == 1 : "latest accepted with multiple rows: " + latestAccepted.update.rowCount(); |
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.
Is this assertion even feasible in everyday situations? Or possible in case of bugs only?
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.
It is possible in case of bugs only.
} | ||
} | ||
|
||
public static void getCurrentAndApplyMVMutations(SinglePartitionReadCommand query, |
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.
nit; should we name this to something like, resolveCurrentAndApplyMVMutations, because "get" might confuse the people in that they would assume that it is doing a read RPC to get the current state, which is not the case.
This PR is for strict_mv_consistency that move MV base table update backed by LWT (Paxos V2).
It contains following changes:
The Cassandra Jira