Commit Graph

1457 Commits

Author SHA1 Message Date
Mark Paluch
cb1839e0c6 Add assertions to fail early on absent values using StreamMessageListenerContainer.
Closes #2472
2023-01-02 11:09:51 +01:00
Mark Paluch
74cff0b3ef Extend license header copyright years to 2023.
See #2475
2023-01-02 09:52:09 +01:00
Mark Paluch
6318478945 Prepare 2.7.6 (2021.2.6).
See #2435
2022-11-18 10:44:45 +01:00
John Blum
d60f3c02bd Correct 'Redis Cache' reference document title.
Change redis-cache.adoc document title from '==' to '=' to appear as section 10.15 instead of 10.14.1,
which currently places the 'Redis Cache' ref doc under 'Redis Scripting'.

Closes #2458
Original pull request #2459
2022-11-16 09:02:22 +01:00
skyjiang
23ff8cd5b7 Remove duplicate map keys in Lettuce TypeHints.
Closes #2314
2022-11-11 10:34:39 +01:00
Mark Paluch
9eb7c432aa Fix emptiness check in MappingRedisConverter.
Closes #2446
2022-11-11 10:33:36 +01:00
Christoph Strobl
66d44b1671 Add Nullable annotation to parameter of overridden equals method.
Closes: #2450
Original pull request: #2451
2022-11-11 10:25:01 +01:00
Spring Builds
85212ccb55 Prepare 2.7.5 (2021.2.5).
See #2434
2022-10-13 13:21:35 +00:00
Spring Builds
1bd8f1239f Prepare 2.7.4 (2021.2.4).
See #2410
2022-10-13 08:57:07 +00:00
Mark Paluch
8c7a2bf5b2 Properly parse IPv6 host and port into RedisNode.
Closes #2418
2022-10-04 09:42:34 +02:00
Mark Paluch
a608d53d3a Improve failure-safety of Cursor.
Any failures during opening the cursor or scanning now close the cursor and release associated resources.

Closes #2414
2022-09-30 11:46:05 +02:00
断桥烟雨
0aa5bb62b6 Fix typo in Javadoc.
Closes #2417
2022-09-30 11:34:20 +02:00
Mark Paluch
af530d189c Refine HMGET and MGET documentation.
Closes #2309
2022-09-22 09:40:52 +02:00
Mark Paluch
899dca4bc1 Polishing.
Unroll extension to avoid JvmOverload usage.

Closes #2227
2022-09-21 15:33:54 +02:00
Dylan
89f4c7e238 Add approximate trimming to reactive stream extensions.
See #2227
2022-09-21 15:33:54 +02:00
Spring Builds
7942aa5601 Prepare 2.7.3 (2021.2.3).
See #2368
2022-09-19 11:36:22 +00:00
Jens Deppe
d1252689f6 Invoke correct BZPOPMAX method when called with a Duration.
`ZSetOperations.popMax(K key, Duration timeout)` now calls `popMax` instead the previously incorrect method `popMin`.

Closes #2323
2022-09-16 14:24:33 +02:00
Mark Paluch
da9a0e0b4e Polishing.
Simplify code using arraycopy only for array copies. Call concatAll(…) from concat(…). Use i++ intead of ++i notation.

See #2366
2022-09-16 14:14:04 +02:00
Guy Korland
3e13b53e74 Improve ByteUtils.concatAll(…) array allocations.
Closes #2366
2022-09-16 14:14:04 +02:00
Mark Paluch
4144b459eb Polishing.
Add author tags. Align Lettuce BZPOPMIN/MAX tests. Increase timeout to 10ms as Redis blocks indefinitely if the timeout is less than 0.01.

See #2324
2022-09-16 11:45:17 +02:00
Jens Deppe
9af608247b Fix potential NullPointerException when using Jedis Cluster BZPOP*.
For the Jedis-based implementations of bzpopmin and bzpopmax, a NPE is
  thrown if the provided timeout elapses and the server responds with a
  null array.

Closes #2324
2022-09-16 11:44:36 +02:00
Christoph Strobl
6b00487d72 Fix serialization issues with default typing in GenericJackson2JsonRedisSerializer.
Closes #2396
Original pull request: #2399.
2022-09-16 11:21:34 +02:00
Mark Paluch
6a77187e4b Refine documentation of HRANDFIELD and HRANDFIELD … WITHVALUES.
The documentation is now more precise about the return value.

Closes #2407
2022-09-15 14:23:53 +02:00
Mark Paluch
c95a051d22 Return null elements for absent keys using reactive MGET.
We now use correctly null to indicate absent keys when using reactive MGET. Previously, we used an empty byte buffer that could be incorrectly translated to an empty string when using the string codec. An empty byte buffer can also be returned if the value length is zero leading to a state that doesn't allow distinguishing between absence and empty value.

Closes #2402
2022-09-13 15:11:49 +02:00
Mark Paluch
1dbf2ff5e8 Call hstrlen on JedisCluster.
We now call hstrlen on the Cluster client instead of using our execute(…) fallback and determining the correct cluster node ourselves.

Closes #2392
2022-08-31 10:09:51 +02:00
Mark Paluch
2ca0c43a0b Polishing.
Remove invalid test.

See #2355
2022-07-21 11:45:08 +02:00
Mark Paluch
7de0a95f07 Unsubscribe only once on Subscription.close().
We now unsubscribe from Redis only once when closing a Subscription object to avoid duplicate traffic and unexpected Redis responses.

Jedis does not have a mechanism to consume the additional unsubscribe response which leaves protocol frames on the InputStream leading to a corrupt state.

Closes #2355
2022-07-21 11:28:56 +02:00
Christoph Strobl
0d3de4b7ba Prepare 2.7.2 (2021.2.2).
See #2347
2022-07-15 11:07:51 +02:00
Christoph Strobl
52c2d583b6 Fix HashMapper issue flattening java.math types.
We now make sure to include types from the java.math namespace.

Closes: #2365
2022-07-15 07:28:35 +02:00
Christoph Strobl
0897825709 Resolve target type of wrapped one in custom StdTypeResolverBuilder.
This commit makes sure to avoid typing of primitive wrapper types wrapped inside what is considered a jackson ReferenceType (such as Optional, AtomicReference,...).

Original Pull Request: #2364
2022-07-15 07:25:24 +02:00
Mark Paluch
0e23a805ca Introduce custom StdTypeResolverBuilder to support primitive arrays without type hints.
Closes: #2361
Original Pull Request: #2364
2022-07-15 07:24:23 +02:00
Mark Paluch
0c51d99e9b Polishing.
We now ensure proper exception handling in connection close methods to avoid resource leaks. Also, exceptions during connection close are no longer thrown to ensure proper resource cleanup behavior and API design.

See #2356
2022-07-14 16:05:07 +02:00
Mark Paluch
e13370307c JedisConnection.close() no longer throws exceptions.
We now ensure proper exception handling in close methods to avoid resource leaks. Also, exceptions during connection close are no longer thrown to ensure proper resource cleanup behavior and API design.

Closes #2356
2022-07-14 16:04:44 +02:00
Mark Paluch
23c3d4ab2b Allow configuration of RedisMessageListenerContainer through @EnableRedisRepositories.
We now support configuration of a bean reference to RedisMessageListenerContainer that should be used with `RedisKeyValueAdapter` for easier configuration of the listener container.

Closes #1827
2022-07-13 09:38:48 +02:00
Mark Paluch
0d0df323b5 Fix Cluster sort.
Jedis Cluster sort now considers if the destination key is sharing the same slot as the source key to use same-slot sorting.

Additionally, sort results that do not map to the same slot replace the destination key with a list instead of checking the key type and appending results.

Closes #2341
2022-06-28 11:09:18 +02:00
Shyngys Sapraliyev
a810d378b6 Fix DefaultSerializationContext assertion message.
Closes #2336
2022-06-28 09:34:35 +02:00
Mark Paluch
82b0ab3de7 Consider type hints of the actual value in MappingRedisConverter.
We now consider the actual value type when determining whether a value should be considered an entity. Previously, we relied on PersistentProperty type information only which made it impossible to use generic-typed (or Object) properties for entities.

Closes #2349
2022-06-23 11:39:00 +02:00
Mark Paluch
94600f13b4 Prepare 2.7.1 (2021.2.1).
See #2325
2022-06-20 11:29:06 +02:00
Mark Paluch
e7abb9a516 Correctly release connection after switching to Pub/Sub mode.
LettuceConnection.switchToPubSub now correctly releases its underlying connection when switching to Pub/Sub. Also, we improved safeguards to avoid using closed connections.

Closes #2331
2022-06-03 09:14:18 +02:00
Mark Paluch
14eebce19c Capture subscriber initialization exceptions in init future.
We now capture exceptions during the connection initialization and subscription to avoid getting the container into an invalid state.

Closes #2335
2022-06-02 09:07:17 +02:00
Mark Paluch
3c1e8579b0 Fix resource disposal ordering in LettuceConnectionFactory.
We now close the cluster command executor before cleaning up the connection pools so that we first release all held connections before pruning the connection pools.
Previously, the pools were pruned first leading to an attempt to return the connection held by the cluster command executor causing a PoolException.

Closes #2330
2022-05-24 15:18:11 +02:00
Christoph Strobl
4e74c7ede8 Prepare 2.7 GA (2021.2.0).
See #2303
2022-05-13 10:04:21 +02:00
Christoph Strobl
d35ed93321 Update spring.io project urls.
This commit updates outdated projects.spring.io links to spring.io/projects.

Closes: #2319
2022-05-10 12:52:56 +02:00
Mark Paluch
f30e93e8d0 Polishing.
Update Spring Framework documentation links.

See #2297
2022-04-21 11:49:29 +02:00
Dveamer
f9d85ebaab Fix broken link in the redis-transaction ref docs.
The link to "declarative transaction management" was broken.

Closes #2297
2022-04-21 11:35:54 +02:00
Mark Paluch
f66384a4ba Attempt early usage of custom converters.
We now try to eagerly apply a custom converter when reading Redis properties in the MappingRedisConverter before considering type hints from the hash.

We require type hints to properly restore the target type for a hash entry as Redis data is all byte arrays, so a simple String needs a type hint before we can load it back into an e.g. Object-typed property. Subtypes of properties (such as ZoneRegion for ZoneId) are sometimes not associated with a converter as only the parent type (ZoneId) is associated with a converter. Trying to convert the value into the subtype directly through our ConversionService would fail in that case.

Closes #2307
2022-04-20 15:16:56 +02:00
Christoph Strobl
509c02f0bd Prepare 2.7 RC1 (2021.2.0).
See #2284
2022-04-19 11:10:15 +02:00
Mark Paluch
ccb4fe4df2 Correctly return connection future from StaticMasterReplicaConnectionProvider.
We now pass on the connection future when connecting through StaticMasterReplicaConnectionProvider.getConnectionAsync(…).

Closes #2296
2022-04-06 14:26:50 +02:00
Mark Paluch
6cd9d2b3c3 Polishing.
Add nullable annotations. Add tests.

See #2279
Original pull request: #2280.
2022-03-31 10:07:40 +02:00
helei01_gza
71549a4605 Eagerly return null values in AbstractOperations.deserializeGeoResults(…) to avoid null dereference.
Closes #2279
Original pull request: #2280.
2022-03-31 10:07:27 +02:00