spring-projects / spring-data-cassandra

Provides support to increase developer productivity in Java when using Apache Cassandra. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-cassandra/
Apache License 2.0
374 stars 310 forks source link

Possible to have single application instance do all DDL updates? #1389

Closed donahchoo closed 1 year ago

donahchoo commented 1 year ago

Hi,

Is it possible in SDC to have a single application instance issue DDL updates one at a time and until schema agreement has been achieved cluster-wide before issuing the next DDL statement?

I think this answer is no, but just checking...

donahchoo commented 1 year ago

I think this is a duh moment... just turn off all the automatic DDL changes by default in the main profile then have a profile that enables it and only run that profile on one instance?

mp911de commented 1 year ago

You pretty much found out about a potential approach. Limiting activity to a single node requires orchestration. Controlling instances through profiles is a viable option. Another approach could be a cluster-wide lock on a single resource but such an approach, while it doesn't involve manual steps, it bears quite some compexity.