The following is the flow when adding a keyspace in Cassandra (according to the comments in the Cassandrda source code. Correct me if I am wrong)
1) In the first step, check if new clusters are added.
2) In the second stage, we check if there are any archived temporary key spaces, in this context, that they were previously deleted, but still exist in the low-level scheme as empty keys
3) In the last step, we update the changed key spaces and save the key spaces that they carry later.
When changing Keyspace, it calls the updateKeyspace function, and here it seems that the metadata of the space keys is corrupted, which causes an assertion error.
SO in your case, it may be that you deleted the same key space and tried to recreate the cause of this problem or, as you said, it was a metadata corruption.
source share