Skip to content

rangeWithScores() resolves to RedisCommand.UNKNOWN inside transaction #3187

@sharpie1330

Description

@sharpie1330

When using rangeWithScores(...) inside a transaction (i.e. with @Transactional and setEnableTransactionSupport(true)), it unexpectedly returns null instead of the set of values.

Internally, the command is correctly built as:

// RedisCommandBuilder#zrangeWithScores
Command<K, V, List<ScoredValue<V>>> zrangeWithScores(K key, long start, long stop) {
    notNullKey(key);
    CommandArgs<K, V> args = new CommandArgs(this.codec);
    args.addKey(key).add(start).add(stop).add(CommandKeyword.WITHSCORES);
    return this.createCommand(CommandType.ZRANGE, new ScoredValueListOutput(this.codec), args);
}

However, this command is ultimately resolved as RedisCommand.UNKNOWN because of:

RedisCommand commandToExecute = RedisCommand.failsafeCommandLookup(method.getName());

in ConnectionSplittingInterceptor#intercept();

Image

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions