- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
是否可以在 Scylla DB
中重置计数器列?
在 Cassandra
中,it is not possible直接将计数器列重置为零:
There is no operation that will allow resetting the counter value. You need to read the value and decrement it using that value.
Be aware that this operation might not be successful since the counter can be changed between your "reset" operations.
Scylla DB
也是如此吗?
最佳答案
Scylla 中也有类似的行为。我们不能将计数器值重置为 0,计数器只能递增或递减。
scylla@cqlsh:ks> CREATE TABLE cf (pk int PRIMARY KEY, my_counter counter);
scylla@cqlsh:ks> UPDATE cf SET my_counter = my_counter + 3 WHERE pk = 0;
scylla@cqlsh:ks> SELECT * FROM cf;
pk | my_counter
----+------------
0 | 3
(1 rows)
scylla@cqlsh:ks> UPDATE cf SET my_counter = 0 WHERE pk = 0;
InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot set the value of counter column my_counter (counters can only be incremented/decremented, not set)"
scylla@cqlsh:ks> UPDATE cf SET my_counter = my_counter - 3 WHERE pk = 0;
scylla@cqlsh:ks> SELECT * FROM cf;
pk | my_counter
----+------------
0 | 0
(1 rows)
请注意尝试直接设置值时的错误。
更多相关信息:
https://docs.scylladb.com/using-scylla/counters/#scylla-counters
关于database - 如何将 Scylla DB 中的计数器列重置为零?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72178766/
我想重新启动我的 Scylla 数据库集群。但我不想丢失任何数据。 如果我重新启动一个又一个节点,我会丢失任何数据吗? 最佳答案 如果“重新启动节点”仅涉及重新启动 Scylla 或重新启动其运行的内
我正在阅读有关 Scylla 升级过程的文档(例如,阅读文档http://docs.scylladb.com/upgrade/upgrade-guide-from-2.0-to-2.1-ubuntu/
我有一个以 timeuuid 作为聚类键的表。 CREATE TABLE event ( domain TEXT, createdAt TIMEUUID, kin
当我加载数据时,在 scylla 节点启动时出现此错误 Nov 12 21:55:13 usw1-im-stage-scylladb1 scylla[53703]: [shard 0] databa
是否有 nodetool 的 API ?特别是 nodetool tablestats 我看到有https://github.com/scylladb/scylla/tree/master/api/a
我正在使用 Cassandra 3.0.15v 并想使用 scylla 提供的 sstableloader 实用程序将我的数据移动到 scylla db 3.3.0v,我尝试了不同的方法,但我无法做到
我在 scylla 中有一个表,称之为“tablex”,在键空间“keyspacey”中,现在,我将其中的数据加载到 Spark 中,并且我观察到了非常大量的分区,深入研究了我看到的代码它使用mean
安装 scylla 服务器后,无法启动并出现以下错误消息, Jun 04 07:07:56 localhost.localdomain scylla[29145]:Scylla 版本 2.3.5-0.
Scylla DB 为二级索引实现了所谓的“key prefix optimization ”,如果指定了主键的一部分,则可以消除过滤。例如。可以在表 A 上执行 SELECT * FROM A WH
我正在尝试在表 Scylla 集群上创建 GSI。根据文档,我可以创建 CREATE INDEX ON ks.users (email);,它将在它创建的物化 View 中包含此字段和主键。有没有一种
Scylla 如何确定何时从其缓存中逐出数据?例如,假设表 T 具有以下结构: K1 C1 V1 V2 V3 我用 500 行填充了上面的表(例如,查询 SELECT * from T WHERE K
从包含二级索引的表中删除一列时,出现以下错误。我正在使用 ScyllaDB 版本 3.0.4。 [无效查询] message="无法在具有物化 View 的基表 warehouse.myuser 上删
我已经在redhat / centos服务器上安装了docker。 docker服务运行良好,但是我如何在docker上安装或构建cassandra / scylla镜像。我的服务器未与Interne
看看如何 Scylla is described on compose.com它说: Scylla requires fast IO and as much RAM as the total data
Cassandra(或 Scylla)的好处之一是: When a table has multiple clustering columns, the data is stored in neste
我正在用 Docker 试用 Scylla,当我尝试启动一个包含这样卷的容器时: 更新:仅在设置-developer-mode=0时运行,设置--developer-mode 1时运行。就像错误消息中
我读到您可以在 Cassandra/Scylla 中为每个表设置压缩策略,如此处所述 https://docs.scylladb.com/operating-scylla/procedures/con
有没有办法将列表/集合修剪为特定大小(根据元素数量)? 类似于 Redis 上的 LTRIM 命令(https://redis.io/commands/ltrim)。 目标是向列表/集合中插入一个元素
Scylla 如何保证/保持写入工作负载情况的低写入延迟,因为更多的写入会产生更多的内存刷新和压缩?有节流吗?如果有人可以回答,那将非常有帮助。 最佳答案 从本质上讲,Scylla 通过并行化问题来提
我运行了 21 个节点的 Cassandra 集群,其中包含 150 多个架构和大约 20 TB 的数据。我需要在没有停机的情况下将架构和数据从 Cassandra 转移到 7 节点 Scylla。
我是一名优秀的程序员,十分优秀!