krojew
krojew

Reputation: 1346

UDT migrations in cassandra

I'm looking for concrete recommendations on how to approach user defined types migration in cassandra and I can't find anything conclusive. Does anyone have experience changing such types when they're in use? If so, what's the best strategy to approach the problem? A UDT cannot be modified when in use which makes it really difficult to migrate. What are the necessary steps to make it happen?

Upvotes: 0

Views: 150

Answers (1)

Alex Ott
Alex Ott

Reputation: 87359

There are only 2 operations possible for UDTs in Cassandra:

  • Adding a new field
  • Renaming the field

In reality, I would suggest just to add new fields to the UDT, and don't rename existing fields - when you add a new field, this could be done incrementally in application, while renaming will require deployment of the new version at time of change, and this is not always possible.

Upvotes: 0

Related Questions