Question

I am using super column to create chat between two people.

Each chat has it's own row where all of the messages are contained.

And when user wants to delete that chat i would just rename column to something like old_chat_deleted and i would create new column family where new chat messages would be stored, but now the problem is how can i rename my old column family?

If that is not possible the only option left is to delete whole cf and create new one with new name, but if chat have 100k+ messages that would probably be very very slow, since i would need to retrieve all data back to my server and then insert it back...

Was it helpful?

Solution

Renaming column CF's are not supported out of the box.

You don't need to create a new CF for every chat. You can create a CF with messages for all chats and include and indexed column identifying the chat session. Or you can use composite keys for the chat records.

Creating a CF for every chat is a bad practice and will severely impact the cassandra performance.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top