cassandra - 保存 cassandra 复合主键的更新
问题描述
我有一个复合主键(uid,陈旧),当我尝试编辑陈旧的布尔值时,它会被重复(因为复合键可以支持这两种组合)
例如:
1) uid-val, TRUE
当陈旧的列更新为 FALSE 导致 2 行数据具有旧的 TRUE 和新的 FALSE
1) uid-val, TRUE
2) uid-val, FALSE
在插入更新的值之前有没有办法克服这个问题而不是删除?
解决方案
No - change of the components of the primary key will lead to adding the new row...
Why not convert that column into "normal" column from partition key/clustering column? I think that you need adjust data model
推荐阅读
- bash - 从文件和管道读取时,Shell 程序的行为不同
- python - django 在每次运行时显示一个新生成的 html 文件
- r - 如何导入具有变量值、标签、角色和测量级别(测量)的 SPSS sav 文件?
- javascript - 向 javascript 添加输入
- python - BeautifulSoup 没有解析整个 html
- encryption - 在不知道如何加密的情况下解密 AES 字符串
- android - 单击后退按钮时片段更改时如何设置选择的侧栏菜单项?
- c++ - 在运行时使用 Ranges 更新结果
- java - 构造函数需要一个找不到的 bean 类型
- apache-kafka - Kafka 流状态存储是为了什么?