mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 10:30:38 +00:00
hint_sender decides whether to send a hint directly to its destination or to re-mutate from scratch based on token_metadata::is_leaving(), which only checks whether the *host* is leaving the cluster. When a tablet is dropped from a host due to RF reduction (RF--), the host is still alive and is_leaving() returns false, so hint_sender sends directly to a replica that will no longer own the data -- effectively losing the hint. Switch to the new ermp->is_leaving(host, token) which is tablet-aware. When the destination's tablet is being migrated away *and* there are pending endpoints, send directly (the pending endpoints will receive the data via streaming); otherwise fall through to the re-mutate path so all current replicas receive the mutation.