Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

wdeng avatar image
wdeng asked ·

cassandra做repair的时候,什么时候用-pr呢?

cassandra做repair的时候,参数-pr我看得不是很明白,可以解释下么。什么时候用-pr呢?

repair
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Jane Deng avatar image
Jane Deng answered ·

-pr 意思是做primary token range 的repair。 当所有的节点(node) 完成一遍 repair -pr, 数据被修复一次, 且仅一次,不会有同一token range 被重复repair 的情况。-pr 是最常用的repair option。 当用户需要做 Cassandra repair 的 时候,大多数情况下,使用 "nodetool repair -pr" , 一次一个节点 (node), 直到所有节点都被repair. 如果有多个data center,每个data center 都要 repair一次,这样保证所有的数据被repair.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.