title: What does Cassandra nodetool repair exactly do?
body: <p>From <a href="http://docs.datastax.com/en/cassandra/2.0/cassandra/operations/ops_repair_nodes_c.html" rel="nofollow">http://docs.datastax.com/en/cassandra/2.0/cassandra/operations/ops_repair_nodes_c.html</a> I know that</p>
  
  <blockquote>
    <p>The nodetool repair command repairs inconsistencies across all of the replicas for a given range of data.</p>
  </blockquote>
  
  <ul>
  <li>but how does it fix the inconsistencies? It's written it uses Merkle trees - but that's for comparison not for fixing 'broken' data.</li>
  <li>How the data can be 'broken'? Any common cases despite hard drive failure?</li>
  </ul>
  
  <p>Question aside: it's compaction which evicts tombstones, right? So the requirement for running nodetool repair more frequently than gc_grace seconds is only to ensure that all data is spread to appropriate replicas? Shouldn't be that the usual scenario?</p>