adinas
adinas

Reputation: 4550

Cassandra "compactionstats" and "garbagecollect"

I have 3 nodes in my cluster. I've run the command:

nodetool garbagecollect my_schema my_table

on one node. When I check on the other two nodes the command:

nodetool compactionstats

I get the result:

pending tasks: 1
- my_schema.my_table: 1

So, My question is, Does starting the garbagecollect on one node mean it will eventually run on the other nodes? Is that the reason I see the pending on the other two nodes or do I need to run the garbagecollect command on each nodes separately?

Upvotes: 1

Views: 776

Answers (1)

Alex Ott
Alex Ott

Reputation: 87224

nodetool subcommands are triggering the action on that node only, so you need to run nodetool garbagecollect on every node separately. It also depends on what do you want to remove - by default it deletes only partitions and rows, but not individual deleted cells. If you need to delete cells as well, use -g CELL flag (see this blog post for more details).

Upvotes: 1

Related Questions