Skip to content

Support configurable batch types for batch operations #1174

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

Closed
samueldlightfoot opened this issue Sep 29, 2021 · 2 comments
Closed

Support configurable batch types for batch operations #1174

samueldlightfoot opened this issue Sep 29, 2021 · 2 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@samueldlightfoot
Copy link
Contributor

We regularly use unlogged batches for single partition writes as a performance enhancement to reduce messages sent to Cassandra (and stop the coordinator node being overloaded). It would be nice to provide support for this via the ReactiveCassandraBatchOperations, which currently strictly supports LOGGED batches.

I may be missing part of the reasoning for strictly supporting logged batches, so feel free to correct me if there is reasoning for this.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 29, 2021
@mp911de
Copy link
Member

mp911de commented Sep 30, 2021

Thanks for reaching out. We initially decided to use logged batches as unlogged batches often times are misused and we wanted to guide users towards proper usage. ReactiveCassandraTemplate could expose a batchOps(BatchType) method to define the batch type. Its imperative counterpart, CassandraTemplate should be updated as well.

Would you be interested in submitting a pull request for such a change?

@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 30, 2021
@samueldlightfoot
Copy link
Contributor Author

Hi Mark

Makes sense. Sounds good, I'll submit a PR for this.

samueldlightfoot added a commit to samueldlightfoot/spring-data-cassandra that referenced this issue Sep 30, 2021
samueldlightfoot added a commit to samueldlightfoot/spring-data-cassandra that referenced this issue Sep 30, 2021
samueldlightfoot added a commit to samueldlightfoot/spring-data-cassandra that referenced this issue Sep 30, 2021
@mp911de mp911de linked a pull request Sep 30, 2021 that will close this issue
4 tasks
@mp911de mp911de changed the title BatchType.UNLOGGED support via ReactiveCassandraBatchOperations Support configurable batch types for batch operations Sep 30, 2021
@mp911de mp911de added this to the 3.2.6 (2021.0.6) milestone Sep 30, 2021
@mp911de mp911de self-assigned this Sep 30, 2021
mp911de pushed a commit that referenced this issue Oct 1, 2021
mp911de added a commit that referenced this issue Oct 1, 2021
Remove constructors defaulting to BatchType.LOGGED and turn batchOps() into default methods to avoid defaulting sprawl.

Update since tags.

See #1174
Original pull request: #1175.
@mp911de mp911de closed this as completed in 99f3bcc Oct 1, 2021
mp911de added a commit that referenced this issue Oct 1, 2021
Remove constructors defaulting to BatchType.LOGGED and turn batchOps() into default methods to avoid defaulting sprawl.

Update since tags.

See #1174
Original pull request: #1175.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants