我有一个包含这些列的表:
cassandra@cqlsh:test> DESCRIBE Table "ItemSource";
CREATE TABLE connect."ItemSource" (
"Identifier" text,
"SourceID" uuid,
"ItemID" uuid,
"Priority" int,
"AdditionalParams" map<text, text>,
"Binding" map<text, text>,
"CountryRestriction" list<text>,
"ItemSourceID" uuid,
"Marker" text,
"Scraped" int,
"SearchField" text,
PRIMARY KEY (("Identifier", "SourceID"), "ItemID", "Priority")
) WITH CLUSTERING ORDER BY ("ItemID" ASC, "Priority" ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = ''
AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
我启动了以下列来添加一个名为 Limit 的 int 类型的列:
ALTER TABLE "ItemSource" ADD "Limit" int;
该表已包含元素,我将它们全部更新,因此它们的限制为 0,如果我使用 cqlsh 执行以下命令,则会出现“限制”列并且值也存在。
但是,如果我使用 gocql(cassandra 的 Go 驱动程序)执行完全相同的请求,我没有收到 Limit 列,但我收到了其他列,这是发出的请求:
SELECT * FROM "ItemSource" WHERE "Identifier" = ? AND "ItemID" = ? AND "SourceID" = ? AND "Priority" = ? LIMIT ? ALLOW FILTERING
我不知道发生了什么,我尝试将数据复制到 csv 文件,然后截断表格,然后重新导入数据,仍然得到相同的结果......
会不会是缓存问题?如果是,我该如何清空它。否则,会是什么?