Skip to content

Conversation

@SreedevT
Copy link

@SreedevT SreedevT commented Sep 29, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Description

Add CDC agent for Cassandra 5.0 support

Adds a complete CDC agent implementation for Apache Cassandra 5.0. Currently cdc agent does not work on Cassandra 4.1+ or Cassandra 5.0+ due to issues mentioned in #180. This includes a new agent-c5 module with Cassandra 5.0-specific CDC handling, addressing API changes and compatibility issues between Cassandra 4.0 and 5.0.

Consideration

Cassandra 4.1 and 5.0 introduced breaking changes in internal APIs that the CDC agent relies on. This creates a dedicated agent implementation that handles the new APIs while maintaining the same CDC functionality.

Changes

  • New agent-c5 module with complete CDC implementation for Cassandra 5.0
  • Updated CommitLogReadHandler to work with Cassandra 5.0 internal APIs
  • Java 11, 17 compatibility with required JVM exports/opens for Cassandra 5.0
  • Docker configuration for Cassandra 5.0 CDC containers
  • Test suite with integration tests for single and dual node setups
  • Updated build configuration to support Cassandra 5.0.4

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.

@SreedevT SreedevT marked this pull request as draft September 29, 2025 20:44
@SreedevT SreedevT marked this pull request as ready for review October 1, 2025 05:38
@SreedevT
Copy link
Author

SreedevT commented Oct 1, 2025

@srinath-ctds Could you check this out

@SreedevT
Copy link
Author

@eric-schneider @aimurphy Possible to take a look at this? Are there any other cdc solutions in the works for cassandra 5

@aimurphy
Copy link
Contributor

@eric-schneider @aimurphy Possible to take a look at this? Are there any other cdc solutions in the works for cassandra 5

@SreedevT We only work on the docs portion of cdc-apache-cassandra. An engineer like @srinath-ctds would have to review this.

@SreedevT
Copy link
Author

A majority of the code is a copy of the c4 agent. My bad on not making the commits clearer. The major deviance from the c4 are these:

  1. Build Configuration (build.gradle):
  • Java 17 requirement
  • Cassandra 5 dependency
  1. CommitLogReaderServiceImpl.java changes :
  • Replaced deprecated JMXEnabledThreadPoolExecutor with ExecutorPlus API
  • Changed from NamedThreadFactory to ExecutorFactory.Global.executorFactory()
  • Updated thread pool configuration to use new builder pattern
  1. File API changes (CommitLogReaderServiceImpl.java):
  • Changed commitLogReader.readCommitLogSegment() call to use new org.apache.cassandra.io.util.File wrapper
  • Added CommitLogReader.ALL_MUTATIONS parameter
  1. TimeUUID handling in PulsarMutationSender.java:
  • Added handler for Cassandra 5's new TimeUUID class
  • Converts org.apache.cassandra.utils.TimeUUID to standard UUID for Avro serialization
  1. Tests remain largely the same

  2. Added c5 agent to ci.yaml. I am not confident on the changes done to backfill-cli this is incomplete

I can commit in order of changes if that would make things easier but it would be an ordeal now, again sorry about that.

@SreedevT
Copy link
Author

Hi @eolivelli @jtgrabowski could you take a look at this

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.

2 participants