压实历史乱序

compaction history out of order

我正在使用 nodetool 查看压缩历史,并获取附件图像

如您所见,时间完全乱序,范围从第 17 场 (1489786637207) 到第 21 场 (1490122248602)

我们正在使用 Cassandra 3.0.8,使用 bulk loader 上传 sstables,并使用 TimeWindowCompactionStrategy 压缩。

知道是什么原因造成的吗?

压缩历史记录 table 未排序:

CREATE TABLE system.compaction_history (
  id uuid PRIMARY KEY,
  bytes_in bigint,
  bytes_out bigint,
  columnfamily_name text,
  compacted_at timestamp,
  keyspace_name text,
  rows_merged map<int, bigint>
)

它只有一个 default_time_to_live = 604800 数据在 1 周后过期。 Nodetool 实际上只是在打印这个 table.

编辑: 所以实际上 nodetool 应该在客户端对来自 jmx 的结果进行排序。 CompactionHistoryHolder will sort it, and the compareTo checks the compactedAt field. So it not being sorted by the time of the compaction is probably a bug. I would recommend opening a jira 更多详情。