diff --git a/CHANGES.txt b/CHANGES.txt index a4be758832..ff726a9882 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,7 @@ * RateBasedBackPressure unnecessarily invokes a lock on the Guava RateLimiter (CASSANDRA-14163) * Fix wildcard GROUP BY queries (CASSANDRA-14209) Merged from 3.0: + * Write to pending endpoint when view replica is also base replica (CASSANDRA-14251) * Chain commit log marker potential performance regression in batch commit mode (CASSANDRA-14194) * Fully utilise specified compaction threads (CASSANDRA-14210) * Pre-create deletion log records to finish compactions quicker (CASSANDRA-12763) diff --git a/NEWS.txt b/NEWS.txt index 445623e96f..745dad2740 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -42,6 +42,14 @@ restore snapshots created with the previous major version using the 'sstableloader' tool. You can upgrade the file format of your snapshots using the provided 'sstableupgrade' tool. +3.11.3 +===== + +Upgrading +--------- + - Materialized view users upgrading from 3.0.15 (3.0.X series) or 3.11.1 (3.11.X series) and later that have performed range movements (join, decommission, move, etc), + should run repair on the base tables, and subsequently on the views to ensure data affected by CASSANDRA-14251 is correctly propagated to all replicas. + 3.11.2 ====== diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java index e67d46e87e..4dc05e3e16 100644 --- a/src/java/org/apache/cassandra/service/StorageProxy.java +++ b/src/java/org/apache/cassandra/service/StorageProxy.java @@ -795,8 +795,11 @@ public class StorageProxy implements StorageProxyMBean continue; } - // When local node is the paired endpoint just apply the mutation locally. - if (pairedEndpoint.get().equals(FBUtilities.getBroadcastAddress()) && StorageService.instance.isJoined()) + // When local node is the endpoint we can just apply the mutation locally, + // unless there are pending endpoints, in which case we want to do an ordinary + // write so the view mutation is sent to the pending endpoint + if (pairedEndpoint.get().equals(FBUtilities.getBroadcastAddress()) && StorageService.instance.isJoined() + && pendingEndpoints.isEmpty()) { try {