-
Notifications
You must be signed in to change notification settings - Fork 21
CNDB-15623: Only use write path for CDC tables in CassandraStreamReceiver if CDC is enabled on the node #2043
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
Conversation
…iver if CDC is enabled on the node
Checklist before you submit for review
|
|
Low test coverage is because we don't run the test suite with CDC enabled on PRs. I ran the test suite with CDC enabled and saw no additional failures. |
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.
The change looks good to me. On the CNDB side we never enable CDC at the DatabaseDescriptor level, so the write path will not be triggered for cross-region repairs in Astra.
|
@maxtomassi @jkni As a side note, @jtgrabowski rightful concern about merging this without passing the quality gate (see Slack discussion) made me realize C* doesn't seem to have any kind of contract between |
|
As mentioned in Slack, the only relationship I see between the two properties are in here: cassandra/src/java/org/apache/cassandra/schema/SchemaKeyspace.java Lines 607 to 610 in b9c402b
Which seems to apply when a new table is created and when a table is altered. This means the |
…airs Repairs on CDC-enabled tables use the local write path when the stream is received on a CDC-enabled node. There is no existing test coverage of this local write path. This commit parameterizes this existing test to run end-to-end repairs for every combination of node-enabled/table-enabled, adding assertions to cover which stream path is used.
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.
The test looks good to me, thanks for coming up with a way to cover the changes :)
|
|
As discussed with Max, pinging Sergio for any further thoughts. Max can pick this up and merge if any issues are resolved before I'm online tomorrow. |
✔️ Build ds-cassandra-pr-gate/PR-2043 approved by ButlerApproved by Butler |
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.
The new test looks great, thanks everyone!
|
To close the loop on #2043 (comment), we verified that even if |
…iver if CDC is enabled on the node (#2043) Repairs use the local write path for streams on CDC-enabled tables, based on table schema. This interacts poorly with the separation of CNDB services. This commit fixes the issue by only using the CDC write path for a stream if CDC is enabled in the node's configuration (as well as in the schema). This avoids attempting to use the local write path if commitlog-based CDC is not enabled.
…iver if CDC is enabled on the node (#2043) Repairs use the local write path for streams on CDC-enabled tables, based on table schema. This interacts poorly with the separation of CNDB services. This commit fixes the issue by only using the CDC write path for a stream if CDC is enabled in the node's configuration (as well as in the schema). This avoids attempting to use the local write path if commitlog-based CDC is not enabled.
…raStreamReceiver if CDC is enabled on the node (#2043) Repairs use the local write path for streams on CDC-enabled tables, based on table schema. This interacts poorly with the separation of CNDB services. This commit fixes the issue by only using the CDC write path for a stream if CDC is enabled in the node's configuration (as well as in the schema). This avoids attempting to use the local write path if commitlog-based CDC is not enabled.
…iver if CDC is enabled on the node (#2043) Repairs use the local write path for streams on CDC-enabled tables, based on table schema. This interacts poorly with the separation of CNDB services. This commit fixes the issue by only using the CDC write path for a stream if CDC is enabled in the node's configuration (as well as in the schema). This avoids attempting to use the local write path if commitlog-based CDC is not enabled.
…raStreamReceiver if CDC is enabled on the node (#2043) Repairs use the local write path for streams on CDC-enabled tables, based on table schema. This interacts poorly with the separation of CNDB services. This commit fixes the issue by only using the CDC write path for a stream if CDC is enabled in the node's configuration (as well as in the schema). This avoids attempting to use the local write path if commitlog-based CDC is not enabled.



What is the issue
Repairs use the local write path for streams on CDC-enabled tables, based on table schema. This interacts poorly with the separation of CNDB services.
What does this PR fix and why was it fixed
Only use the CDC write path for a stream if CDC is enabled in the node's configuration (as well as in the schema). This avoids attempting to use the local write path if commitlog-based CDC is not enabled.