Cassandra提示丢弃时间疑问:默认配置下的两种说法解析
Cassandra Hinted Handoffs: When Are Hints Discarded (Default Config)?
Great question—this is a super common point of confusion with Cassandra's hinted handoff mechanism! The two articles you're referencing aren't conflicting—they're talking about two different stages of how hints are managed. Let me break it down clearly:
max_hint_window_in_ms(default 3 hours): This controls when Cassandra stops generating new hints for a downed node. If a node stays unavailable longer than this window, the cluster stops creating new hints for it. The goal here is to avoid piling up endless hints that would eat into storage if a node is down long-term.gc_grace_seconds(default 10 days): This controls how long existing hints are retained before being garbage-collected. Even after Cassandra stops making new hints (after the 3-hour window), any hints that were already generated will stick around for up to 10 days. If the downed node comes back online within that 10-day window, those hints will be handed off to it to sync up the missing data. If it stays down beyond 10 days, the hints get discarded entirely, and you'll need to run a repair to reconcile the out-of-sync data.
To sum it up with default settings:
- First 3 hours of a node being down: New hints are created for all writes targeting that node.
- After 3 hours: No new hints are generated, but existing ones are preserved.
- After 10 days total: Any leftover hints are discarded permanently.
内容的提问来源于stack exchange,提问作者Ankitha Sathya
相关产品推荐
相关产品推荐

