Skip to content

Tags: slunski/scylla

Tags

scylla-4.0.rc2

Toggle scylla-4.0.rc2's commit message
release: prepare for 4.0.rc2

scylla-4.0.rc1

Toggle scylla-4.0.rc1's commit message
release: prepare for 4.0.rc1

scylla-3.2.4

Toggle scylla-3.2.4's commit message
release: prepare for 3.2.4

scylla-4.0.rc0

Toggle scylla-4.0.rc0's commit message
release: prepare for 4.0.rc0

scylla-3.3.0

Toggle scylla-3.3.0's commit message
release: prepare for 3.3.0

scylla-3.3.rc3

Toggle scylla-3.3.rc3's commit message
release: prepare for 3.3.rc3

scylla-3.2.3

Toggle scylla-3.2.3's commit message
release: prepare for 3.2.3

scylla-3.3.rc2

Toggle scylla-3.3.rc2's commit message
release: prepare for 3.3.rc2

scylla-3.1.4

Toggle scylla-3.1.4's commit message
release: prepare for 3.1.4

scylla-3.2.2

Toggle scylla-3.2.2's commit message
hh: handle counter update hints correctly

This patch fixes a bug that appears because of an incorrect interaction
between counters and hinted handoff.

When a counter is updated on the leader, it sends mutations to other
replicas that contain all counter shards from the leader. If consistency
level is achieved but some replicas are unavailable, a hint with
mutation containing counter shards is stored.

When a hint's destination node is no longer its replica, it is attempted
to be sent to all its current replicas. Previously,
storage_proxy::mutate was used for that purpose. It was incorrect
because that function treats mutations for counter tables as mutations
containing only a delta (by how much to increase/decrease the counter).
These two types of mutations have different serialization format, so in
this case a "shards" mutation is reinterpreted as "delta" mutation,
which can cause data corruption to occur.

This patch backports `storage_proxy::mutate_hint_from_scratch`
function, which bypasses special handling of counter mutations and
treats them as regular mutations - which is the correct behavior for
"shards" mutations.

Refs scylladb#5833.
Backports: 3.1, 3.2, 3.3
Tests: unit(dev)
(cherry picked from commit ec513ac)