Skip to content

Releases: redis/lettuce

5.3.4.RELEASE

15 Sep 12:56
c8f1c07
Compare
Choose a tag to compare

The Lettuce team is pleased to announce the Lettuce 5.3.4 service release!
This release ships with 6 tickets fixed along with dependency upgrades.

Find the full changelog at the end of this document.

Thanks to all contributors who made Lettuce 5.3.4.RELEASE possible.
Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 15. It is tested continuously against the latest Redis source-build.

Fixes

  • Wrong cast in StringCodec may lead to IndexOutOfBoundsException #1367 (Thanks to @dmandalidis)
  • Sentinel authentication failed when using the pingBeforeActivateConnection parameter #1401 (Thanks to @viniciusxyz)
  • LPOS command sends FIRST instead of RANK #1410 (Thanks to @christophstrobl)

Other

  • Upgrade to Project Reactor 3.3.10.RELEASE #1411
  • Upgrade to netty 4.1.52.Final #1412
  • Upgrade test/optional dependencies #1413

Documentation

Reference documentation: https://lettuce.io/core/5.3.4.RELEASE/reference/
Javadoc: https://lettuce.io/core/5.3.4.RELEASE/api/

5.3.3.RELEASE

10 Aug 12:45
f9c00ab
Compare
Choose a tag to compare

The Lettuce team is pleased to announce the Lettuce 5.3.3 service release!
This release ships with 7 tickets fixed along with dependency upgrades.
The upgrade is recommended for Redis Cluster users as it fixes a resource leak that leads to lingering connections caused by topology refresh.

Find the full changelog at the end of this document.

Thanks to all contributors who made Lettuce 5.3.3.RELEASE possible.
Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 16. It is tested continuously against the latest Redis source-build.

Enhancements

  • Feature request: add a cluster-capable version of flushallAsync #1359 (Thanks to @jchambers)
  • BoundedAsyncPool object is ready to be manipulated with even though a connection is not created yet #1363 (Thanks to @little-fish)

Fixes

  • Lingering topology refresh connections when using dynamic refresh sources #1342 (Thanks to @tpf1994)
  • Wrong cast in StringCodec may lead to IndexOutOfBoundsException #1367 (Thanks to @dmandalidis)

Other

  • Deprecate our Spring support classes #1357
  • Consistently translate execution exceptions #1370
  • Upgrade to Reactor 3.3.9.RELEASE #1384

Documentation

Reference documentation: https://lettuce.io/core/5.3.3.RELEASE/reference/
Javadoc: https://lettuce.io/core/5.3.3.RELEASE/api/

6.0.0.RC1

03 Aug 13:46
aa9e7ba
Compare
Choose a tag to compare
6.0.0.RC1 Pre-release
Pre-release

The Lettuce team is delighted to announce the availability of the first Lettuce 6 release candidate.

Most notable changes that ship with this release are

  • Client-side caching support
  • Registration of push message listeners
  • Configuration files for GraalVM Native Image compilation
  • API cleanups/Breaking Changes

Server-assisted Client-side caching support

Redis can notify clients about cache invalidations when you use Redis as a read-through cache.
That is when applications keep a local copy of the cached value and use Redis to back up the local cache before.
When a cache values gets changed (that were fetched from Redis), then Redis notifies interested clients so they can invalidate their near-cache and potentially fetch the changed value.

Redis 6 allows for tracking clients and sending push messages using RESP3 push messages.
Lettuce provides a CacheFrontend that can be used to interact with a cache.

Client-side caching assumes a near cache that can be queried, updated and evicted for individual keys.
Cache values are represented as strings and the entire functionality is exposed through a CacheFrontend.

See the following example that uses a ConcurrentHashMap as near cache and outlines the interaction between involved parties:

Map<String, String> clientCache = new ConcurrentHashMap<>();

RedisCommands<String, String> otherParty = redisClient.connect().sync();

// creates a key
otherParty.set(key, value);

StatefulRedisConnection<String, String> myself = redisClient.connect();
CacheFrontend<String, String> frontend = ClientSideCaching.enable(CacheAccessor.forMap(clientCache), myself,
        TrackingArgs.Builder.enabled().noloop());

// Read-through into Redis
String cachedValue = frontend.get(key);
assertThat(cachedValue).isNotNull();

// client-side cache holds the same value
assertThat(clientCache).hasSize(1);

// now, the key expires
commands.pexpire(key, 1);

// a while later
Thread.sleep(200);

// the expiration reflects in the client-side cache
assertThat(clientCache).isEmpty();

assertThat(frontend.get(key)).isNull()

Lettuce ships out of the box with a CacheAccessor for the Map interface.
You can implement a CacheAccessor for your cache if it doesn't implement the Map interface.
Client-side caching support is only supported when using RESP3. The Pub/Sub mode isn't supported through ClientSideCaching and we don't support Pub/Sub redirection.
Since push messages are node-local, client-side caching is supported only on Redis Standalone setups.
Master/Replica or Clustering operating modes are not supported as multi-node operations and connection failover impose severe complexity onto key tracking.

Read more: https://redis.io/topics/client-side-caching

Registration of push message listeners

Registration of push message listeners completes Lettuce's RESP3 support.
You can register PushMessage listeners on Standalone and Redis Cluster connections by implementing PushListener respective RedisClusterPushListener:

connection.addListener(message -> {

    if (message.getType().equals("invalidate")) {
        invalidations.addAll((List) message.getContent(StringCodec.UTF8::decodeKey).get(1));
    }
});

Using push messages with Redis Cluster are subject to node-locality, therefore RedisClusterPushListener provides access to the RedisClusterNode from which the push message originated.

The content of push messages may consist of arbitrary data structures and vary across various push message types.
PushMessage exposes the message type and access to its content as List<Object>. Bulk content can be decoded into more specific data types.

We're working towards a GA release in late September.
We're considering resolving package cycles at this stage, but we're not sure whether we will ship these changes with Lettuce 6 or postpone these to Lettuce 7.
Specifically, RedisFuture, argument types (all CompositeArgument subtypes), Value including subtypes, and API types such as ScanCursor would be migrated to their own packages.
Your application would be impacted as you would be required to review and adjust your imports.

Thanks to all contributors who made Lettuce 6.0.0.RC1 possible.
Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 15. It is tested continuously against the latest Redis source-build.

API cleanups/Breaking Changes

With this release, we took the opportunity to introduce a series of changes that put the API into a cleaner shape.

  • Remove JavaRuntime class and move LettuceStrings to internal package #1329
  • Remove Spring support classes #1358
  • Replace io.lettuce.core.resource.Futures utility with Netty's PromiseCombiner #1283
  • XGROUP DELCONSUMER should return pending message count #1377 (xgroupDelconsumer(…) now returns Long)

Commands

  • Add support for STRALGO #1280
  • Add support for LPOS #1320

Enhancements

  • Use domain specific value object as return type for xpending. #1229 (Thanks to @christophstrobl)
  • Add template method for EventLoopGroup creation #1273 (Thanks to @konstantin-grits)
  • Add support for Client-side caching #1281
  • Registration of push message listeners #1284
  • Add charset option to ScanArgs.match(…) #1285 (Thanks to @gejun123456)
  • Allow for more customisation of the tracing span #1303 (Thanks to @JaidenAshmore)
  • Support for GraalVM Native Images #1316 (Thanks to @ilopmar)
  • Consider topology updates for default Cluster connections #1317 (Thanks to @be-hase)
  • SSL handshake doesn't respect timeouts #1326 (Thanks to @feliperuiz)
  • Reduce RedisStateMachine bytecode size #1332 (Thanks to @hellyguo)
  • Feature request: add a cluster-capable version of flushallAsync #1359 (Thanks to @jchambers)
  • BoundedAsyncPool object is ready to be manipulated with even though a connection is not created yet #1363 (Thanks to @little-fish)
  • Introduce DecodeBufferPolicy to reduce memory usage #1314 (Thanks to @Shaphan)

Fixes

  • Write race condition while migrating/importing a slot #1218 (Thanks to @phyok)
  • PauseDetector acquisition hang in DefaultCommandLatencyCollector #1300 (Thanks to @ackerL)
  • NullPointerException thrown during AbstractRedisAsyncCommands.flushCommands #1301 (Thanks to @MrUKI)
  • xpending(K, Consumer, Range, Limit) fails with ERR syntax error using Limit.unlimited() #1302 (Thanks to @nagaran1)
  • Remove duplicated command on asking #1304 (Thanks to @koisyu)
  • ArrayOutput stops response parsing on empty nested arrays #1327 (Thanks to @TheCycoONE)
  • Synchronous dispatch of MULTI returns null #1335 (Thanks to @tzxyz)
  • RedisAdvancedClusterAsyncCommandsImpl scriptKill is incorrectly calling scriptFlush #1340 (Thanks to @azhukayak)
  • RedisAdvancedClusterAsyncCommands.scriptKill now calls scriptKill instead of scriptFlush #1341 (Thanks to @dengliming)
  • Lingering topology refresh connections when using dynamic refresh sources #1342 (Thanks to @tpf1994)
  • Wrong cast in StringCodec may lead to IndexOutOfBoundsException #1367 (Thanks to @dmandalidis)
  • xpending(key, group) fails without pending messages #1378

Other

  • Upgrade dependencies #1305
  • Add FAQ section to reference docs #1307
  • Rename master branch to main #1308
  • Consistently use Javadoc wording in BoundedPoolConfig.Builder #1337 (Thanks to @maestroua)
  • Upgrade to Reactor Core 3.3.8.RELEASE #1353
  • Upgrade to netty 4.1.51.Final #1354
  • Consistently translate execution exceptions #1370
  • Upgrade to RxJava 3.0.5 #1374
  • Upgrade to Commons Pool 2.8.1 #1375

Documentation

Reference documentation: https://lettuce.io/core/6.0.0.RC1/reference/
Javadoc: https://lettuce.io/core/6.0.0.RC1/api/

5.3.2.RELEASE

21 Jul 07:39
87d30fd
Compare
Choose a tag to compare

The Lettuce team is pleased to announce the Lettuce 5.3.2 service release!
This release ships with 15 tickets fixed along with dependency upgrades.
Most notable enhancement of this release is that Lettuce ships with configuration files for an improved experience when compiling applications to Graal Native Images which make use of Lettuce.

Find the full changelog at the end of this document.

Thanks to all contributors who made Lettuce 5.3.2.RELEASE possible.
Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 16. It is tested continuously against the latest Redis source-build.

Enhancements

Fixes

  • Write race condition while migrating/importing a slot #1218 (Thanks to @phyok)
  • ArrayOutput stops response parsing on empty nested arrays #1327 (Thanks to @TheCycoONE)
  • Synchronous dispatch of MULTI returns null #1335 (Thanks to @tzxyz)
  • RedisAdvancedClusterAsyncCommandsImpl scriptKill is incorrectly calling scriptFlush #1340 (Thanks to @azhukayak)
  • RedisAdvancedClusterAsyncCommands.scriptKill now calls scriptKill instead of scriptFlush #1341 (Thanks to @dengliming)

Other

  • Remove JavaRuntime class and move LettuceStrings to internal package #1329
  • Consistently use Javadoc wording in BoundedPoolConfig.Builder #1337 (Thanks to @maestroua)
  • Upgrade to Reactor Core 3.3.8.RELEASE #1353
  • Upgrade to netty 4.1.51.Final #1354

Documentation

Reference documentation: https://lettuce.io/core/5.3.2.RELEASE/reference/
Javadoc: https://lettuce.io/core/5.3.2.RELEASE/api/

5.3.1.RELEASE

08 Jun 13:52
ecc0b9a
Compare
Choose a tag to compare

The Lettuce team is pleased to announce the Lettuce 5.3.1 service release!
This release ships with 10 tickets fixed along with dependency upgrades.
Most notable changes are fixes around PauseDetector acquisition which may cause infinite loops during metrics logging and therefore command timeouts.

Find the full changelog at the end of this document.

Thanks to all contributors who made Lettuce 5.3.1.RELEASE possible.
Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 14. It is tested continuously against the latest Redis source-build.

Enhancements

  • Add template method for EventLoopGroup creation #1273 (Thanks to @konstantin-grits)
  • Add charset option to ScanArgs.match(…) #1285 (Thanks to @gejun123456)

Fixes

  • PauseDetector acquisition hang in DefaultCommandLatencyCollector #1300 (Thanks to @ackerL)
  • NullPointerException thrown during AbstractRedisAsyncCommands.flushCommands #1301 (Thanks to @MrUKI)
  • xpending(K, Consumer, Range, Limit) fails with ERR syntax error using Limit.unlimited() #1302 (Thanks to @nagaran1)
  • Remove duplicated command on asking #1304 (Thanks to @koisyu)

Other

  • Replace io.lettuce.core.resource.Futures utility with Netty's PromiseCombiner #1283
  • Upgrade dependencies #1305
  • Add FAQ section to reference docs #1307

Documentation

Reference documentation: https://lettuce.io/core/5.3.1.RELEASE/reference/
Javadoc: https://lettuce.io/core/5.3.1.RELEASE/api/

6.0.0.M1

27 Apr 11:58
497a690
Compare
Choose a tag to compare
6.0.0.M1 Pre-release
Pre-release

The Lettuce team is delighted to announce the availability of the first Lettuce 6 milestone.

Lettuce 6 aligns with Redis 6 in terms of API and protocol changes. Both protocols, RESP and RESP3 are supported side-by-side defaulting to RESP.

Most notable changes that ship with this release are

  • RESP3 support
  • ACL Authentication with username/password
  • Asynchronous Cluster Topology Refresh
  • API cleanups/Breaking Changes

We're working towards the next milestone and looking at further Redis 6 features such as client-side caching how these can be incorporated into Lettuce. The release date of Lettuce 6 depends on Redis 6 availability.

Thanks to all contributors who made Lettuce 6.0.0.M1 possible.
Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 14. It is tested continuously against the latest Redis source-build.

RESP3 Support

Redis 6 ships with support for a new protocol version. RESP3 brings support for additional data types to distinguish better between responses. The following response types were introduced with RESP3:

  • Null: a single null value replacing RESP v2 *-1 and $-1 null values.
  • Double: a floating-point number.
  • Boolean: true or false.
  • Blob error: binary-safe error code and message.
  • Verbatim string: a binary-safe string that is typically used as user message without any escaping or filtering.
  • Map: an ordered collection of key-value pairs. Keys and values can be any other RESP3 type.
  • Set: an unordered collection of N other types.
  • Attribute: Like the Map type, but the client should keep reading the reply ignoring the attribute type, and return it to the client as additional information.
  • Push: Out-of-band data.
  • Streamed strings: A large response using chunked transfer.
  • Hello: Like the Map type, but is sent only when the connection between the client and the server is established, in order to welcome the client with different information like the name of the server, its version, and so forth.
  • Big number: a large number non-representable by the Number type

Lettuce supports all response types except attributes. Push messages are only supported for Pub/Sub messages.

The protocol version can be changed through ClientOptions which disables protocol discovery:

ClientOptions options = ClientOptions.builder().protocolVersion(ProtocolVersion.RESP2).build();

Future versions are going to discover the protocol version as part of the connection handshake and use the newest available protocol version.

ACL Authentication

Redis 6 supports authentication using username and password. Lettuce's RedisURI adapts to this change by allowing to specify a username:

redis://username:password@host:port/database

Using RESP3 or PING on connect authenticates the connection during the handshake phase. Already connected connections may switch the user context by issuing an AUTH command with username and password:

StatefulRedisConnection<String, String> connection = client.connect();
RedisCommands<String, String> commands = connection.sync();
commands.auth("username", "password");

Asynchronous Cluster Topology Refresh

Cluster Topology Refresh was in Lettuce 4 and 5 a blocking and fully synchronous task that required a worker thread. A side-effect of the topology refresh was that command timeouts could be delayed as the worker thread pool was used for timeout tasks and the topology refresh. Lettuce 6 ships with a fully non-blocking topology refresh mechanism which is basically a reimplementation of the previous refresh mechanism but using non-blocking components instead.

API cleanups/Breaking Changes

With this release, we took the opportunity to introduce a series of changes that put the API into a cleaner shape.

  • Script Commands: eval, digest, scriptLoad methods now only accept String and byte[] argument types. Previously digest and scriptLoad accepted the script contents as Codec value type which caused issues especially when marshalling values using JSON or Java Serialization. The script charset can be configured via ClientOptions (ClientOptions.builder().scriptCharset(StandardCharsets.US_ASCII).build();), defaulting to UTF-8.
  • Connection: Removal of deprecated timeout methods accepting TimeUnit. Use methods accepting Duration instead.
  • Async Commands: RedisAsyncCommands.select(…) and .auth(…) methods return now futures instead if being blocking methods.
  • Asynchronous API Usage: Connection and Queue failures now no longer throw an exception but properly associate the failure with the Future handle.
  • Master/Replica API: Move implementation classes from io.lettuce.core.masterslave to io.lettuce.core.masterreplica package.
  • Internal: Removal of the internal LettuceCharsets utility class.
  • Internal: Reduced visibility of several protected fields in AbstractRedisClient (eventLoopGroups, genericWorkerPool, timer, clientResources, clientOptions, defaultTimeout).
  • Internal: Consolidation of Future synchronization utilities (LettuceFutures, RefreshFutures, Futures).

Enhancements

  • Use channel thread to enqueue commands #617
  • Redesign connection activation #697
  • Add support for RESP3 #964
  • Consolidate Future utils #1039
  • Make RedisAsyncCommands.select() and auth() async #1118 (Thanks to @ikkyuland)
  • Allow client to pick a specific TLS version and introduce PEM-based configuration #1167 (Thanks to @amohtashami12307)
  • Optimization of BITFIELD args generation #1175 (Thanks to @ianpojman)
  • Add mutate() to SocketOptions #1193
  • Add CLIENT ID command #1197
  • Lettuce not able to reconnect automatically to SSL+authenticated ElastiCache node #1201 (Thanks to @chadlwilson)
  • Add support for AUTH with user + password introduced in Redis 6 #1202 (Thanks to @tgrall)
  • HMSET deprecated in version 4.0.0 #1217 (Thanks to @hodur)
  • Allow selection of Heap or Direct buffers for CommandHandler.buffer #1223 (Thanks to @dantheperson)
  • Support JUSTID flag of XCLAIM command #1233 (Thanks to @christophstrobl)
  • Add support for KEEPTTL with SET #1234
  • Add support for RxJava 3 #1235
  • Retrieve username from URI when RedisURI is built from URL #1242 (Thanks to @gkorland)
  • Introduce ThreadFactoryProvider to DefaultEventLoopGroupProvider for easier customization #1243 (Thanks to @apilling6317)

Fixes

  • Commands Timeout ignored/not working during refresh #1107 (Thanks to @pendula95)
  • StackOverflowError in RedisPublisher #1140 (Thanks to @csunwold)
  • Incorrect access on io.lettuce.core.ReadFrom.isOrderSensitive() #1145 (Thanks to @orclev)
  • Consider ReadFrom.isOrderSensitive() in cluster scan command #1146
  • Improve log message for nodes that cannot be reached during reconnect/topology refresh #1152 (Thanks to @drewcsillag)
  • BoundedAsyncPool doesn't work with a negative maxTotal #1181 (Thanks to @sguillope)
  • TLS setup fails to a master reported by sentinel #1209 (Thanks to @ae6rt)
  • Lettuce metrics creates lots of long arrays, and gives out of memory error. #1210 (Thanks to @omjego)
  • CommandSegments.StringCommandType does not implement hashCode()/equals() #1211
  • Unclear documentation about quiet time for RedisClient#shutdown #1212 (Thanks to @LychakGalina)
  • StreamReadOutput in Lettuce 6 creates body entries containing the stream id #1216
  • Write race condition while migrating/importing a slot #1218 (Thanks to @phyok)
  • randomkey return V not K #1240 (Thanks to @hosunrise)
  • ConcurrentModificationException iterating over partitions #1252 (Thanks to @johnny-costanzo)
  • Replayed activation commands may fail because of their execution sequence #1255 (Thanks to @robertvazan)
  • Fix infinite command timeout #1260
  • Connection leak using pingBeforeActivateConnection when PING fails #1262 (Thanks to @johnny-costanzo)
  • Lettuce blocked when connecting to Redis #1269 (Thanks to @jbyjby1)
  • Stream commands are not considered for ReadOnly routing #1271 (Thanks to @redviper)

Other

  • Refactor script content argument types to String and byte[] instead of V (value type) #1010 (Thanks to @danielsomekh)
  • Render Redis.toString() to a Redis URI #1040
  • Pass Allocator as RedisStateMachine constructor argument #1053
  • Simplify condition to invoke "resolveCodec" method in AnnotationRedisCodecResolver #1149 (Thanks to @machi1990)
  • Encode database in RedisURI in path when possible #1155
  • Remove LettuceCharsets #1156
  • Move SocketAddress resolution from RedisURI to SocketAddressResolver #1157
  • Remove deprecated timeout methods accepting TimeUnit #1158
  • Upgrade to RxJava 2.2.13 #1162
  • Add ByteBuf.touch(…) to aid buffer leak investigation #1164
  • Add warning log if MasterReplica(…, Iterable) contains multiple Sentinel URIs #1165
  • Adapt GEOHASH tests to 10 chars #1196
  • Migrate Master/Replica support to the appropriate package #1199
  • Disable RedisURIBuilderUnitTests failing on Windows OS #1204 (Thanks to @kshchepanovskyi)
  • Provide a default port(DEFAULT_REDIS_PORT) to RedisURI's Builder #1205 (Thanks to @hepin1989)
  • Update code for pub/sub to listen on the stateful connection object. #1207 (Thanks to @judepereira)
  • Un-deprecate ClientOptions.pingBeforeActivateConnection #1208
  • Use consistently a shutdown timeout of 2 seconds in all AbstractRedisClient.shutdown methods #1214
  • Upgrade dependencies (netty to 4.1.49.Final) #1161, #1224, #1225, #1239, #1259
  • RedisURI class does not parse password when using redis-sentinel #1232 (Thanks to @kyrogue)
  • Reduce log level to DEBUG for native library logging #1238 (Thanks to @DevJoey)
  • Reduce visibility of fields in AbstractRedisClient #1241
  • Upgrade to stunnel 5.56 #1246
  • Add build profiles for multiple Java versions #1247
  • Replace outdated Sonatype parent POM with p...
Read more

5.3.0.RELEASE

27 Apr 11:40
8fa74a8
Compare
Choose a tag to compare

The Lettuce team is pleased to announce the Lettuce 5.3.0 release!
We decided to add another release before Lettuce goes 6.0. Our wiki explains which versions are supported.
This release ships with 37 tickets fixed and contains a couple API revisions. Most notable is the revised SSL configuration API for PEM-encoded certificate support and TLS protocol selection.
Note that this release ships also a change in the randomkey() method signature fixing the return type.

Please also note carefully if you're using zero-timeouts. With this release, zero timeouts map to infinite command timeouts. While the documentation was already correct about that issue, the implementation didn't consider zero-timeouts.

Thanks to all contributors who made Lettuce 5.3.0.RELEASE possible.
Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 14. It is tested continuously against the latest Redis source-build.

Enhancements

  • Allow client to pick a specific TLS version and introduce PEM-based configuration #1167 (Thanks to @amohtashami12307)
  • Add mutate() to SocketOptions #1193
  • Add CLIENT ID command #1197
  • Relax field count check in CommandDetailParser #1200
  • Lettuce not able to reconnect automatically to SSL+authenticated ElastiCache node #1201 (Thanks to @chadlwilson)
  • HMSET deprecated in version 4.0.0 #1217 (Thanks to @hodur)
  • Allow selection of Heap or Direct buffers for CommandHandler.buffer #1223 (Thanks to @dantheperson)
  • Support JUSTID flag of XCLAIM command #1233 (Thanks to @christophstrobl)
  • Add support for KEEPTTL with SET #1234
  • Add support for RxJava 3 #1235
  • Introduce ThreadFactoryProvider to DefaultEventLoopGroupProvider for easier customization #1243

Fixes

  • BoundedAsyncPool doesn't work with a negative maxTotal #1181 (Thanks to @sguillope)
  • Issuing GEORADIUS_RO on a replica fails when no masters are available. #1198 (Thanks to @leif-erikson)
  • TLS setup fails to a master reported by sentinel #1209 (Thanks to @ae6rt)
  • Lettuce metrics creates lots of long arrays, and gives out of memory error. #1210 (Thanks to @omjego)
  • CommandSegments.StringCommandType does not implement hashCode()/equals() #1211
  • Unclear documentation about quiet time for RedisClient#shutdown #1212 (Thanks to @LychakGalina)
  • Write race condition while migrating/importing a slot #1218 (Thanks to @phyok)
  • randomkey return V not K #1240 (Thanks to @hosunrise)
  • ConcurrentModificationException iterating over partitions #1252 (Thanks to @johnny-costanzo)
  • Replayed activation commands may fail because of their execution sequence #1255 (Thanks to @robertvazan)
  • Fix infinite command timeout #1260
  • Connection leak using pingBeforeActivateConnection when PING fails #1262 (Thanks to @johnny-costanzo)
  • Lettuce blocked when connecting to Redis #1269 (Thanks to @jbyjby1)
  • Stream commands are not considered for ReadOnly routing #1271 (Thanks to @redviper)

Other

  • Disable RedisURIBuilderUnitTests failing on Windows OS #1204 (Thanks to @kshchepanovskyi)
  • Provide a default port(DEFAULT_REDIS_PORT) to RedisURI's Builder #1205 (Thanks to @hepin1989)
  • Un-deprecate ClientOptions.pingBeforeActivateConnection #1208
  • Upgrade dependencies (netty to 4.1.49.Final) #1224, #1225, #1277, #1239
  • RedisURI class does not parse password when using redis-sentinel #1232 (Thanks to @kyrogue)
  • Reduce log level to DEBUG for native library logging #1238 (Thanks to @DevJoey)
  • Upgrade to stunnel 5.56 #1246
  • Add build profiles for multiple Java versions #1247
  • Replace outdated Sonatype parent POM with plugin definitions #1258
  • Upgrade dependencies #1259
  • Upgrade to RxJava 3.0.2 #1261
  • Upgrade to Reactor Core 3.3.5 #1276
  • Reduce min thread count to 2 #1278

Documentation

Reference documentation: https://lettuce.io/core/5.3.0.RELEASE/reference/
Javadoc: https://lettuce.io/core/5.3.0.RELEASE/api/

5.2.2.RELEASE

11 Feb 10:49
6d66fd3
Compare
Choose a tag to compare

The Lettuce team is pleased to announce the Lettuce 5.2.2 release!
This release ships with mostly bug fixes and dependency upgrades addressing 13 tickets in total.

Find the full changelog at the end of this document.

Thanks to all contributors who made Lettuce 5.2.2.RELEASE possible.
Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 14. It is tested continuously against the latest Redis source-build.

Enhancements

Fixes

  • BoundedAsyncPool doesn't work with a negative maxTotal #1181 (Thanks to @sguillope)
  • Issuing GEORADIUS_RO on a replica fails when no masters are available. #1198 (Thanks to @leif-erikson)
  • TLS setup fails to a master reported by sentinel #1209 (Thanks to @ae6rt)
  • Lettuce metrics creates lots of long arrays, and gives out of memory error. #1210 (Thanks to @omjego)
  • CommandSegments.StringCommandType does not implement hashCode()/equals() #1211
  • Unclear documentation about quiet time for RedisClient#shutdown #1212 (Thanks to @LychakGalina)
  • Write race condition while migrating/importing a slot #1218 (Thanks to @phyok)
  • Relax field count check in CommandDetailParser #1200
  • Lettuce not able to reconnect automatically to SSL+authenticated ElastiCache node #1201 (Thanks to @chadlwilson)

Other

  • Disable RedisURIBuilderUnitTests failing on Windows OS #1204 (Thanks to @kshchepanovskyi)
  • Un-deprecate ClientOptions.pingBeforeActivateConnection #1208
  • Upgrade dependencies #1225

Documentation

Reference documentation: https://lettuce.io/core/5.2.2.RELEASE/reference/
Javadoc: https://lettuce.io/core/5.2.2.RELEASE/api/

5.2.1.RELEASE

30 Oct 13:59
2328f8a
Compare
Choose a tag to compare

The Lettuce team is pleased to announce the Lettuce 5.2.1 release!
This release ships with mostly bug fixes and dependency upgrades addressing 9 tickets in total.

Find the full changelog at the end of this document.

Thanks to all contributors who made Lettuce 5.2.1.RELEASE possible.
Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 13. It is tested continuously against the latest Redis source-build.

Fixes

  • StackOverflowError in RedisPublisher #1140 (Thanks to @csunwold)
  • Incorrect access on io.lettuce.core.ReadFrom.isOrderSensitive() #1145 (Thanks to @orclev)
  • Consider ReadFrom.isOrderSensitive() in cluster scan command #1146
  • Improve log message for nodes that cannot be reached during reconnect/topology refresh #1152 (Thanks to @drewcsillag)

Other

  • Simplify condition to invoke "resolveCodec" method in AnnotationRedisCodecResolver #1149 (Thanks to @machi1990)
  • Upgrade to netty 4.1.43.Final #1161
  • Upgrade to RxJava 2.2.13 #1162
  • Add ByteBuf.touch(…) to aid buffer leak investigation #1164
  • Add warning log if MasterReplica(…, Iterable) contains multiple Sentinel URIs #1165

Documentation

Reference documentation: https://lettuce.io/core/5.2.1.RELEASE/reference/
Javadoc: https://lettuce.io/core/5.2.1.RELEASE/api/

5.2.0.RELEASE

26 Sep 14:25
55ebef8
Compare
Choose a tag to compare

The Lettuce team is pleased to announce the Lettuce 5.2.0 release!
This release contains new features, bug fixes, and enhancements.

Most notable changes are:

  • Sentinel refinements
  • Node randomization when reading from Redis Cluster nodes
  • Codec enhancements
  • Migrated tests to JUnit 5

Find the full changelog at the end of this document that lists all 110 tickets.

Work for Lettuce 6, the next major release has already started. Lettuce 6 will support RESP3 and should ship in time for Redis 6.

Thanks to all contributors who made Lettuce 5.2.0.RELEASE possible.

Lettuce requires a minimum of Java 8 to build and run and is compatible with Java 13. It is tested continuously against the latest Redis source-build.

Sentinel refinements

Since this release, Lettuce can connect to Redis Sentinel using secure sockets (SSL) and can authenticate against Sentinel using passwords.
To use SSL, enable SSL usage on RedisURI the same way how it's done for Redis Standalone and Redis Cluster.
Lettuce also introduced a new protocol scheme with rediss-sentinel://. Please note that enabling SSL enables encryption for both, Sentinel and data node communication.

Password authentication follows the same pattern. Setting a password on a Sentinel RedisURI enables password authentication for Sentinel and data nodes.

Read from random Redis Cluster node

Redis Cluster supports now node randomization to avoid excessive usage of individual nodes when reading from these. ReadFrom now exposes a isOrderSensitive() method to indicate whether a ReadFrom setting is order-sensitive or whether respecting order isn't required. Custom ReadFrom implementations should consider this change. ReadFrom.ANY is a newly introduced setting that allows reading from any node (master or a qualified replica) without an ordering preference if multiple replicas qualify for reading.

Codec enhancements

As of this release, we ship two notable enhancements for codecs:

  • CipherCodec for transparent encryption and decryption of values.
  • Codec composition through RedisCodec.of(…) to set up a composed codec from a key and a value codec.

CipherCodec is created by using a delegate codec and CipherSupplier for encryption and decryption. Values are encoded first and then encrypted before values are written to Redis.

SecretKeySpec key = …;
CipherCodec.CipherSupplier encrypt = new CipherCodec.CipherSupplier() {
    @Override
    public Cipher get(CipherCodec.KeyDescriptor keyDescriptor) throws GeneralSecurityException {

        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
        cipher.init(Cipher.DECRYPT_MODE, key);
        return cipher;
    }
};

CipherCodec.CipherSupplier decrypt = (CipherCodec.KeyDescriptor keyDescriptor) -> {

    Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
    cipher.init(Cipher.DECRYPT_MODE, key);
    return cipher;
};

RedisCodec<String, String> crypto = CipherCodec.forValues(StringCodec.UTF8, encrypt, decrypt);

CipherCodec supports multiple keys to increment key versions and to decrypt values with older key versions. The code above is to illustrate how to construct CipherCodec and does not guarantee to outline a secure Cipher setup that meets your requirements.

With RedisCodec.of(…), applications can quickly compose a RedisCodec of already existing codecs instead of writing an entire codec from scratch. Codec composition is useful to use different codecs for key and value encoding:

RedisCodec<String, byte[]> composed = RedisCodec.of(StringCodec.ASCII, ByteArrayCodec.INSTANCE);

Read more on Codecs at: https://github.com/lettuce-io/lettuce-core/wiki/Codecs

Commands

Enhancements

  • Make adaptive topology refresh better usable for failover/master-slave promotion changes #672 (Thanks to @mudasirale)
  • Allow randomization of read candidates using Redis Cluster #834 (Thanks to @nborole)
  • AsyncExecutions should implement CompletionStage #862
  • BraveTracing should support custom names for the service name #865 (Thanks to @worldtiki)
  • Emit Connection Error events #885 (Thanks to @squishypenguin)
  • Allow usage of publishOn scheduler for reactive signal emission #905
  • Optimize aggregation buffer cleanup in CommandHandler #906 (Thanks to @gavincook)
  • Add shutdown logging to client, ClientResources, and EventLoopGroupProvider #918
  • Add flag to disable reporting of span tags #920 (Thanks to @worldtiki)
  • Optimization: Use Cluster write connections for read commands when using ReadFrom.MASTER #923
  • ByteBuf.release() was not called before it's garbage-collected #930 (Thanks to @zhouzq)
  • Add cipher codec #934
  • Introduce adaptive trigger event #952
  • Deprecate PING on connect option #965
  • Do not require CLIENT LIST in cluster topology refresh #973 (Thanks to @bentharage)
  • Add support for Redis Sentinel authentication #1002 (Thanks to @ssouris)
  • Improve mutators for ClientOptions, ClusterClientOptions, and ClientResources #1003
  • TopologyComparators performance issue #1011 (Thanks to @alessandrosimi-sa)
  • Attach topology retrieval exceptions when Lettuce cannot retrieve a topology update #1024 (Thanks to @StillerRen)
  • Support TLS connections in Sentinel mode #1048 (Thanks to @ae6rt)
  • Reduce object allocations for assertions #1068
  • Reduce object allocations for Cluster topology parsing #1069
  • Support ByteArrayCodec only for values #1122 (Thanks to @dmandalidis)
  • lettuce#ClusterTopologyRefresh is too slow,because of “client list” #1126 (Thanks to @xjs1919)

Fixes

  • Unable to reconnect Pub/Sub connection with authorization #868 (Thanks to @maestroua)
  • Reduce allocations in topology comparator #870
  • Fix recordCommandLatency to work properly #874 (Thanks to @jongyeol)
  • Bug: Include hostPortString in the error message #876 (Thanks to @LarryBattle)
  • Reference docs CSS prevents HTTPS usage #878
  • ReactiveCommandSegmentCommandFactory resolves StreamingOutput for all reactive types #879 (Thanks to @yozhag)
  • ClassCastException occurs when executing RedisClusterClient::connectPubSub with global timeout feature #895 (Thanks to @be-hase)
  • Flux that reads from a hash, processes elements and writes to a set, completes prematurely #897 (Thanks to @vkurland)
  • Fixed stackoverflow exception inside CommandLatencyCollectorOptions #899 (Thanks to @LarryBattle)
  • PubSubEndpoint.channels and patterns contain duplicate binary channel/pattern names #911 (Thanks to @lwiddershoven)
  • DefaultCommandMethodVerifier reports invalid parameter count #925 (Thanks to @GhaziTriki)
  • Chunked Pub/Sub message receive with interleaved command responses leaves commands uncompleted #936 (Thanks to @GavinTianYang)
  • Fix typo in log message #970 (Thanks to @twz123)
  • Result is lost when published on another executor #986 (Thanks to @trueinsider)
  • Cancel ClusterTopologyRefreshTask in RedisClusterClient.shutdownAsync() #989 (Thanks to @johnsiu)
  • ClassCastException occurs when using RedisCluster with custom-command-interface and Async API #994 (Thanks to @tamanugi)
  • Application-level exceptions in Pub/Sub notifications mess up pub sub decoding state and cause timeouts #997 (Thanks to @giridharkannan)
  • RedisClient.shutdown hangs because event loops terminate before connections are closed #998 (Thanks to @Poorva17)
  • "Knowing Redis" section in documentation has the wrong link for meanings. #1050 (Thanks to @Raghaava)
  • ClassCastException occurs when using RedisCommandFactory with custom commands #1075 (Thanks to @mdebellefeuille)
  • EventLoop thread blocked by EmitterProcessor.onNext(…) causes timeouts #1086 (Thanks to @trishaarao79)
  • RedisClusterNode without slots is never considered having same slots as an equal object #1089 (Thanks to @y2klyf)
  • RedisClusterClient doesn't respect the SocketOptions connectTimeout #1119 (Thanks to @magnusandy)
  • Remove duplicated ConnectionWatchdog #1132 (Thanks to @mors741)

Other

  • Migrate tests to JUnit 5 #430
  • Could not generate CGLIB subclass of class io.lettuce.core.support.ConnectionPoolSupport$1 #843 (Thanks to @peerit12)
  • Adapt to changed terminology for master/replica #845
  • Ability to provide a custom service name for spans #866 (Thanks to @worldtiki)
  • Remove tempusfugit dependency #871
  • Makefile refactor download redis #877 (Thanks to @LarryBattle)
  • Upgrade to Reactor Californium SR1 #883
  • Upgrade to Redis 5 GA #893
  • Document MasterSlave connection behavior on partial node failures #894 (Thanks to @jocull)
  • Upgrade to RxJava 2.2.3 #901
  • Upgrade to Spring Framework 4.3.20.RELEASE #902
  • Upgrade to netty 4.1.30.Final #903
  • Upgrade to Reactor Core 3.2.2.RELEASE #904
  • Deprecate StatefulConnection.reset() #907 (Thanks to @semberal)
  • Upgrade to Reactor Core 3.2.3.RELEASE #931
  • Upgrade to netty 4.1.31.Final #932
  • Upgrade to RxJava 2.2.4 #933
  • Javadoc is missing Javadoc links to Project Reactor types (Flux, Mono) #942
  • Extend year range for 2019 in license headers #950
  • Use ConcurrentHashMap.newKeySet() as replacement of Netty's ConcurrentSet #961
  • Streamline communication sections in readme, issue templates and contribution guide #967
  • Upgrade to stunnel 5.50 #968
  • Replace old reactive API docs #974 (Thanks to @pine)
  • Upgrade to Reactor 3.2.6.RELEASE #975
  • Upgrade to netty 4.1.33.Final #976
  • Upgrade to HdrHistogram 2.1.11 #978
  • Upgrade to RxJava 2.2.6 #979
  • Use JUnit BOM for dependency management and upgrade to JUnit 5.4.0 #980
  • Use logj42 BOM for dependency management and upgrade to 2.11.2 #981
  • Upgrade to AssertJ 3.12.0 #983
  • U...
Read more