Skip to content

Commit 2597756

Browse files
uglideclaude
andcommitted
Fix node-selection aggregate interface wiring
NodeSelectionCommands and NodeSelectionAsyncCommands did not extend the ACL and Array node-selection groups, and NodeSelectionAsyncCommands extended the sync NodeSelectionStreamCommands instead of NodeSelectionStreamAsyncCommands. Breaking change: stream commands on AsyncNodeSelection now return AsyncExecutions<T> instead of Executions<T>. Removes the NODE_SELECTION_AGGREGATE_PENDING exemption so the consistency test suite enforces the aggregate wiring again. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 622d675 commit 2597756

4 files changed

Lines changed: 18 additions & 26 deletions

File tree

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.lettuce.core.cluster.api.async;
22

33
import io.lettuce.core.cluster.api.NodeSelectionSupport;
4-
import io.lettuce.core.cluster.api.sync.NodeSelectionStreamCommands;
54

65
/**
76
* Asynchronous and thread-safe Redis API to execute commands on a {@link NodeSelectionSupport}.
@@ -10,12 +9,13 @@
109
* @author Tihomir Mateev
1110
* @author Yordan Tsintsov
1211
*/
13-
public interface NodeSelectionAsyncCommands<K, V> extends BaseNodeSelectionAsyncCommands<K, V>,
14-
NodeSelectionFunctionAsyncCommands<K, V>, NodeSelectionGeoAsyncCommands<K, V>, NodeSelectionHashAsyncCommands<K, V>,
15-
NodeSelectionHLLAsyncCommands<K, V>, NodeSelectionKeyAsyncCommands<K, V>, NodeSelectionListAsyncCommands<K, V>,
16-
NodeSelectionScriptingAsyncCommands<K, V>, NodeSelectionServerAsyncCommands<K, V>, NodeSelectionSetAsyncCommands<K, V>,
17-
NodeSelectionSortedSetAsyncCommands<K, V>, NodeSelectionStreamCommands<K, V>, NodeSelectionStringAsyncCommands<K, V>,
18-
NodeSelectionJsonAsyncCommands<K, V>, NodeSelectionVectorSetAsyncCommands<K, V>, NodeSelectionSearchAsyncCommands<K, V>,
19-
NodeSelectionBloomFilterAsyncCommands<K, V>, NodeSelectionCuckooFilterAsyncCommands<K, V>,
20-
NodeSelectionTopKAsyncCommands<K, V> {
12+
public interface NodeSelectionAsyncCommands<K, V>
13+
extends BaseNodeSelectionAsyncCommands<K, V>, NodeSelectionAclAsyncCommands<K, V>,
14+
NodeSelectionArrayAsyncCommands<K, V>, NodeSelectionFunctionAsyncCommands<K, V>, NodeSelectionGeoAsyncCommands<K, V>,
15+
NodeSelectionHashAsyncCommands<K, V>, NodeSelectionHLLAsyncCommands<K, V>, NodeSelectionKeyAsyncCommands<K, V>,
16+
NodeSelectionListAsyncCommands<K, V>, NodeSelectionScriptingAsyncCommands<K, V>, NodeSelectionServerAsyncCommands<K, V>,
17+
NodeSelectionSetAsyncCommands<K, V>, NodeSelectionSortedSetAsyncCommands<K, V>, NodeSelectionStreamAsyncCommands<K, V>,
18+
NodeSelectionStringAsyncCommands<K, V>, NodeSelectionJsonAsyncCommands<K, V>, NodeSelectionVectorSetAsyncCommands<K, V>,
19+
NodeSelectionSearchAsyncCommands<K, V>, NodeSelectionBloomFilterAsyncCommands<K, V>,
20+
NodeSelectionCuckooFilterAsyncCommands<K, V>, NodeSelectionTopKAsyncCommands<K, V> {
2121
}

‎src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionCommands.java‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
* @author Mark Paluch
99
* @author Tihomir Mateev
1010
*/
11-
public interface NodeSelectionCommands<K, V> extends BaseNodeSelectionCommands<K, V>, NodeSelectionFunctionCommands<K, V>,
12-
NodeSelectionGeoCommands<K, V>, NodeSelectionHashCommands<K, V>, NodeSelectionHLLCommands<K, V>,
13-
NodeSelectionKeyCommands<K, V>, NodeSelectionListCommands<K, V>, NodeSelectionScriptingCommands<K, V>,
14-
NodeSelectionServerCommands<K, V>, NodeSelectionSetCommands<K, V>, NodeSelectionSortedSetCommands<K, V>,
15-
NodeSelectionStreamCommands<K, V>, NodeSelectionStringCommands<K, V>, NodeSelectionJsonCommands<K, V>,
16-
NodeSelectionVectorSetCommands<K, V>, NodeSelectionSearchCommands<K, V>, NodeSelectionBloomFilterCommands<K, V>,
17-
NodeSelectionCuckooFilterCommands<K, V>, NodeSelectionTopKCommands<K, V> {
11+
public interface NodeSelectionCommands<K, V>
12+
extends BaseNodeSelectionCommands<K, V>, NodeSelectionAclCommands<K, V>, NodeSelectionArrayCommands<K, V>,
13+
NodeSelectionFunctionCommands<K, V>, NodeSelectionGeoCommands<K, V>, NodeSelectionHashCommands<K, V>,
14+
NodeSelectionHLLCommands<K, V>, NodeSelectionKeyCommands<K, V>, NodeSelectionListCommands<K, V>,
15+
NodeSelectionScriptingCommands<K, V>, NodeSelectionServerCommands<K, V>, NodeSelectionSetCommands<K, V>,
16+
NodeSelectionSortedSetCommands<K, V>, NodeSelectionStreamCommands<K, V>, NodeSelectionStringCommands<K, V>,
17+
NodeSelectionJsonCommands<K, V>, NodeSelectionVectorSetCommands<K, V>, NodeSelectionSearchCommands<K, V>,
18+
NodeSelectionBloomFilterCommands<K, V>, NodeSelectionCuckooFilterCommands<K, V>, NodeSelectionTopKCommands<K, V> {
1819
}

‎src/test/java/io/lettuce/core/api/consistency/AggregateInterfaceConsistencyUnitTests.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void nodeSelectionAggregatesCoverAllNodeSelectionGroups() {
8080
SoftAssertions softly = new SoftAssertions();
8181

8282
for (CommandInterfaces group : CLUSTER_GROUPS) {
83-
if (!group.hasNodeSelection() || KnownApiDeviations.NODE_SELECTION_AGGREGATE_PENDING.contains(group.name())) {
83+
if (!group.hasNodeSelection()) {
8484
continue;
8585
}
8686
assertExtends(softly, NodeSelectionCommands.class, group.nodeSelectionSync());

‎src/test/java/io/lettuce/core/api/consistency/KnownApiDeviations.java‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,6 @@ public final class KnownApiDeviations {
112112
*/
113113
public static final Set<String> NOT_ON_NODE_SELECTION_SYNC = setOf("dispatch");
114114

115-
/**
116-
* Command groups whose node-selection aggregate wiring is known to be incomplete: {@code NodeSelectionCommands} and
117-
* {@code NodeSelectionAsyncCommands} do not extend the ACL and Array groups, and {@code NodeSelectionAsyncCommands} extends
118-
* the <em>sync</em> {@code NodeSelectionStreamCommands} instead of the async flavor. Correcting the Stream wiring changes
119-
* the return types of stream commands on {@code AsyncNodeSelection} from {@code Executions} to {@code AsyncExecutions} — a
120-
* breaking change scheduled for the 8.0 release.
121-
*/
122-
public static final Set<String> NODE_SELECTION_AGGREGATE_PENDING = setOf("ACL", "ARRAY", "STREAM");
123-
124115
/**
125116
* Sync methods with no coroutine counterpart. From {@code KotlinCompilationUnitFactory#SKIP_METHODS}.
126117
*/

0 commit comments

Comments
 (0)