R: Re: Re: Re: AntiEntropy?
Thanks for the confirmatio, Peter. In the company I work for I suggested many times to run repair at least 1 every 10 days (gcgraceseconds is set approx to 10 days in our config) -- but this book has been used against me :-) I will ask to run repair asap Messaggio originale Da: peter.schul...@infidyne.com Data: 13/07/2011 5.07 A: user@cassandra.apache.org, cbert...@libero.itcbert...@libero.it Ogg: Re: Re: Re: AntiEntropy? To be sure that I didn't misunderstand (English is not my mother tongue) here is what the entire repair paragraph says ... Read it, I maintain my position - the book is wrong or at the very least strongly misleading. You *definitely* need to run nodetool repair periodically for the reasons documented in the link I sent before, unless you have specific reasons not to and know what you're doing. -- / Peter Schuller
Re: Re: Re: AntiEntropy?
I'll write a FAQ for this topic :-) maki 2011/7/13 Peter Schuller peter.schul...@infidyne.com: To be sure that I didn't misunderstand (English is not my mother tongue) here is what the entire repair paragraph says ... Read it, I maintain my position - the book is wrong or at the very least strongly misleading. You *definitely* need to run nodetool repair periodically for the reasons documented in the link I sent before, unless you have specific reasons not to and know what you're doing. -- / Peter Schuller -- w3m
Re: Re: Re: Re: AntiEntropy?
In the company I work for I suggested many times to run repair at least 1 every 10 days (gcgraceseconds is set approx to 10 days in our config) -- but this book has been used against me :-) I will ask to run repair asap Note that if GCGraceSeconds is 10 days, you want to run repair often enough that there will never be a moment where there is more than exactly 10 days since the last successfully completed repair *STARTED*. When scheduling repairs, factor in things like - what happens if repair fails? Who gets alerted and how, and will there be time to fix the problem? How long does repair take? So basically, leave significant margin. -- / Peter Schuller
R: Re: Re: Re: Re: AntiEntropy?
Note that if GCGraceSeconds is 10 days, you want to run repair often enough that there will never be a moment where there is more than exactly 10 days since the last successfully completed repair *STARTED*. When scheduling repairs, factor in things like - what happens if repair fails? Who gets alerted and how, and will there be time to fix the problem? How long does repair take? Peter thanks for the tip. I'm still very surprised for what I've read in the book about the repair. Best Regards Carlo
R: Re: AntiEntropy?
From Cassandra the definitive guide - Basic Maintenance - Repair Running nodetool repair causes Cassandra to execute a Major Compaction [...] AntiEntropyService implements the Singleton pattern and defines the static Differencer class as well, which is used to compare two trees. If it finds any differences, it launches a repair for the ranges that don't agree. So, although Cassandra takes care of such matters automatically on occasion you can run it yourself as well So now I'm confused ... Cassandra doc says that I have to run it by myself, Cassandra book says I don't have to. Did I misunderstand something? I looked around in the code, it seems that AntiEntropy operations are not automatically run in the server daemon, but only manually invoked through nodetool, am I correct? Yes, and it's important that you do run repair: http://wiki.apache.org/cassandra/Operations#Frequency_of_nodetool_repair
Re: Re: AntiEntropy?
So now I'm confused ... Cassandra doc says that I have to run it by myself, Cassandra book says I don't have to. Did I misunderstand something? The book is wrong, at least by current versions of Cassandra (I'm basing that on the quote you pasted, I don't know the context). nodetool repair must be scheduled by the operator to run regularly. The name repair is a bit unfortunate; it is not meant to imply that it only needs to run when something is wrong. -- / Peter Schuller
R: Re: Re: AntiEntropy?
The book is wrong, at least by current versions of Cassandra (I'm basing that on the quote you pasted, I don't know the context). To be sure that I didn't misunderstand (English is not my mother tongue) here is what the entire repair paragraph says ... Basic Maintenance There are a few tasks that you’ll need to perform before or after more impactful tasks. For example, it makes sense to take a snapshot only after you’ve performed a flush. So in this section we look at some of these basic maintenance tasks: repair, snapshot, and cleanup. Repair Running nodetool repair causes Cassandra to execute a major compaction. A Merkle tree of the data on the target node is computed, and the Merkle tree is compared with those of other replicas. This step makes sure that any data that might be out of sync with other nodes isn’t forgotten. During a major compaction (see “Compaction” in the Glossary), the server initiates a TreeRequest/TreeReponse conversation to exchange Merkle trees with neighboring nodes. The Merkle tree is a hash representing the data in that column family. If the trees from the different nodes don’t match, they have to be reconciled (or “repaired”) in order to determine the latest data values they should all be set to. This tree compar- ison validation is the responsibility of the org.apache.cassandra.service. AntiEntropy Service class. AntiEntropyService implements the Singleton pattern and defines the static Differencer class as well, which is used to compare two trees. If it finds any differences, it launches a repair for the ranges that don’t agree. So although Cassandra takes care of such matters automatically on occasion, you can run it yourself as well. nodetool repair must be scheduled by the operator to run regularly. The name repair is a bit unfortunate; it is not meant to imply that it only needs to run when something is wrong. -- / Peter Schuller
Re: R: Re: Re: AntiEntropy?
Running nodetool repair causes Cassandra to execute a major compaction This is not what I would call factually accurate. Repair does not run a major compaction. Major compaction is when all SSTables for a CF are compacted down to one SSTable. Cheers - Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 12 Jul 2011, at 10:09, cbert...@libero.it wrote: The book is wrong, at least by current versions of Cassandra (I'm basing that on the quote you pasted, I don't know the context). To be sure that I didn't misunderstand (English is not my mother tongue) here is what the entire repair paragraph says ... Basic Maintenance There are a few tasks that you’ll need to perform before or after more impactful tasks. For example, it makes sense to take a snapshot only after you’ve performed a flush. So in this section we look at some of these basic maintenance tasks: repair, snapshot, and cleanup. Repair Running nodetool repair causes Cassandra to execute a major compaction. A Merkle tree of the data on the target node is computed, and the Merkle tree is compared with those of other replicas. This step makes sure that any data that might be out of sync with other nodes isn’t forgotten. During a major compaction (see “Compaction” in the Glossary), the server initiates a TreeRequest/TreeReponse conversation to exchange Merkle trees with neighboring nodes. The Merkle tree is a hash representing the data in that column family. If the trees from the different nodes don’t match, they have to be reconciled (or “repaired”) in order to determine the latest data values they should all be set to. This tree compar- ison validation is the responsibility of the org.apache.cassandra.service. AntiEntropy Service class. AntiEntropyService implements the Singleton pattern and defines the static Differencer class as well, which is used to compare two trees. If it finds any differences, it launches a repair for the ranges that don’t agree. So although Cassandra takes care of such matters automatically on occasion, you can run it yourself as well. nodetool repair must be scheduled by the operator to run regularly. The name repair is a bit unfortunate; it is not meant to imply that it only needs to run when something is wrong. -- / Peter Schuller
Re: Re: Re: AntiEntropy?
To be sure that I didn't misunderstand (English is not my mother tongue) here is what the entire repair paragraph says ... Read it, I maintain my position - the book is wrong or at the very least strongly misleading. You *definitely* need to run nodetool repair periodically for the reasons documented in the link I sent before, unless you have specific reasons not to and know what you're doing. -- / Peter Schuller
AntiEntropy?
I looked around in the code, it seems that AntiEntropy operations are not automatically run in the server daemon, but only manually invoked through nodetool, am I correct? if this is the case, I guess the reason to disable it is just the load impact it brings to servers? Thanks Yang
Re: AntiEntropy?
I looked around in the code, it seems that AntiEntropy operations are not automatically run in the server daemon, but only manually invoked through nodetool, am I correct? Yes, and it's important that you do run repair: http://wiki.apache.org/cassandra/Operations#Frequency_of_nodetool_repair -- / Peter Schuller