简体   繁体   中英

Will Cassandra reach eventual consistency without manual repair if there is no read for that data during gc.grace.seconds?

Assume the following

  • Replication factor is 3
  • A delete was issued with consistency 2
  • One of the replica was busy (not down) so it drops the request
  • The other two replicas add the tombstone and send the response. So currently the record is marked for deletion in only two replicas.
  • There is no read repair happened as there was no read for that data gc.grace.seconds

Q1.

Will this data be resurrected when a read happens for that record after gc.grace.seconds if there was no manual repair?

(I am not talking about replica being down for more than gc.grace.seconds )

One of the replica was busy (not down) so it drops the request

In this case, the coordinator node realizes that the replica could not be written and stores it as a hint. Once the overwhelmed node starts taking requests again, the hint is "replayed" to get the replica consistent.

However, hints are only kept (by default) for 3 hours. After that time, they are dropped. So, if the busy node does not recover within that 3 hour window, then it will not be made consistent. And yes, in that case a query at consistency-ONE could allow that data to "ghost" its way back.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM