EugeneMi
EugeneMi

Reputation: 3565

compaction history out of order

I'm using nodetool to view compaction history, and get the attached image enter image description here

As you can see the times are completely out of order, and range from Match 17th (1489786637207) to 21st (1490122248602)

We are using Cassandra 3.0.8, uploading the sstables with the bulk loader, and are using TimeWindowCompactionStrategy compaction.

Any ideas what could be causing this?

Upvotes: 1

Views: 448

Answers (1)

Chris Lohfink
Chris Lohfink

Reputation: 16400

The compaction history table isn't ordered:

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>
)

It just has a default_time_to_live = 604800 which expires data after 1 week. Nodetool is really just printing this table.

edit: So actually nodetool is supposed sort the result from jmx on client side. 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 with more details.

Upvotes: 4

Related Questions