Jedis Changes Radish Semantics?

So, Redis defines zrange (and the associated sorted set commands) as the ORDERED result set (the list may not duplicate?).

Why then does zrange (and related APIs) on Jedis (the official and recommended REDIS client) return Set ??? What, by definition, has no concept of ordering?

This is a direct violation of the semantics of redis operations.

This is the implementation of zrange jedis 2.0.0:


  public Set<byte[]> zrange(final byte[] key, final int start, final int end) {
        checkIsInMulti();
        client.zrange(key, start, end);
        final List<byte[]> members = client.getBinaryMultiBulkReply();
        return new LinkedHashSet<byte[]>(members);
    } 

Jedis, are you planning to fix it?

+3
source share
2 answers

In version 2.2.0 it will return SorteSet, according to https://github.com/xetorthio/jedis/issues/244

+1
source

A LinkedHashSet - . , API , .

, SO.

+1

Source: https://habr.com/ru/post/1536421/


All Articles