spring-projects / spring-projects/spring-data-cassandra

Investigate SessionFactory.doInSession(…) and ReactiveSessionFactory.doInSession(…) [DATACASS-768]

Open
#936 0 comments 0 reactions 1 assignee View on GitHub

@mp911de is already working on this.

Since Dec 31, 2020.

type: enhancement
Dominant language
Java
Stars
400
Forks
318
PR merge metrics
No merged PRs in 30d

Description

Mark Paluch opened DATACASS-768 and commented

Spring Data's approach uses a CqlSession per keyspace/tenant to achieve multi-tenancy. Keeping multiple sessions is considered an anti-pattern by the driver which should not be used.

A singleton session with keyspace routing capabilities would require the Cassandra V5 protocol as the new version allows association of keyspaces per statement.

The new protocol is not yet available so we should investigate whether we can switch to a callback-pattern to enclose Cassandra calls. Implementations of SessionFactory could go ahead and issue a setKeyspace call before and after the execution.

We also need to consider how this could work in an asynchronous scenario


No further details from DATACASS-768

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.