This is an automated email from the ASF dual-hosted git repository. mck pushed a commit to branch cassandra-5.0 in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit d0c5f6b0ceb9e9307580c360c270eb377a10c3e1 Merge: b4dcef7841 bfcba9c7c4 Author: Mick Semb Wever <[email protected]> AuthorDate: Mon Oct 27 09:47:41 2025 +0100 Merge branch 'cassandra-4.1' into cassandra-5.0 * cassandra-4.1: ninja-fix – Fix eclipse-warnings error for CASSANDRA-19564 ReadCommandController should close fast to avoid deadlock when building secondary index CHANGES.txt | 2 + .../cassandra/index/SecondaryIndexManager.java | 20 +++++++- .../distributed/test/SecondaryIndexTest.java | 57 +++++++++++++++++++++- .../cassandra/db/marshal/ValueGenerator.java | 7 ++- 4 files changed, 82 insertions(+), 4 deletions(-) diff --cc CHANGES.txt index 924613cdf7,b160f76416..401ac07a1e --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,17 -1,9 +1,19 @@@ -4.1.12 - * ReadCommandController should close fast to avoid deadlock when building secondary index (CASSANDRA-19564) -Merged from 4.0 +5.0.7 ++Merged from 4.1: ++* ReadCommandController should close fast to avoid deadlock when building secondary index (CASSANDRA-19564) +Merged from 4.0: * Updated dtest-api to 0.0.18 and removed JMX-related classes that now live in the dtest-api (CASSANDRA-20884) -4.1.11 +5.0.6 + * Fix range queries on early-open BTI files (CASSANDRA-20976) + * Avoid re-initializing underlying iterator in LazilyInitializedUnfilteredRowIterator after closing (CASSANDRA-20972) + * Flush SAI segment builder when current SSTable writer is switched (CASSANDRA-20752) + * Throw RTE instead of FSError when RTE is thrown from FileUtis.write in TOCComponent (CASSANDRA-20917) + * Upgrade jackson-dataformat-yaml to 2.19.2 and snakeyaml to 2.1 (CASSANDRA-18875) + * Represent complex settings as JSON on system_views.settings table (CASSANDRA-20827) + * Expose StorageService.dropPreparedStatements via JMX (CASSANDRA-20870) + * Sort SSTable TOC entries for determinism (CASSANDRA-20494) +Merged from 4.1: * Redact security-sensitive information in system_views.settings (CASSANDRA-20856) Merged from 4.0: * Fixed incorrect error message constant for keyspace name length validation (CASSANDRA-20915) diff --cc src/java/org/apache/cassandra/index/SecondaryIndexManager.java index ba4132654c,fe015ead16..9011a29337 --- a/src/java/org/apache/cassandra/index/SecondaryIndexManager.java +++ b/src/java/org/apache/cassandra/index/SecondaryIndexManager.java @@@ -1055,22 -927,23 +1057,29 @@@ public class SecondaryIndexManager impl if (!page.hasNext()) break; - try (UnfilteredRowIterator partition = page.next()) + try (UnfilteredRowIterator onePartition = page.next()) + { + partition = ImmutableBTreePartition.create(onePartition).unfilteredIterator(); + } + } + + try (WriteContext ctx = keyspace.getWriteHandler().createContextForIndexing()) + { { - Set<Index.Indexer> indexers = indexes.stream() - .map(index -> index.indexerFor(key, - partition.columns(), - nowInSec, - ctx, - IndexTransaction.Type.UPDATE)) - .filter(Objects::nonNull) - .collect(Collectors.toSet()); + Set<Index.Indexer> indexers = new HashSet<>(indexGroups.size()); + + for (Index.Group g : indexGroups.values()) + { + Index.Indexer indexerFor = g.indexerFor(indexes::contains, + key, + partition.columns(), + nowInSec, + ctx, + IndexTransaction.Type.UPDATE, + null); + if (indexerFor != null) + indexers.add(indexerFor); + } // Short-circuit empty partitions if static row is processed or isn't read if (!readStatic && partition.isEmpty() && partition.staticRow().isEmpty()) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
