Commit Graph

2866 Commits

Author SHA1 Message Date
John Blum
68f514bdd8 Refine initialization of the TypeResolver in GenericJackson2JsonRedisSerializer.
Closes #2750
2023-10-18 22:27:13 -07:00
John Blum
12f5fad1ba Cleanup equals(:Object) method and compiler warnings in RedisSentinelConfiguration.
Additionally:

* Annotates getMaster() with @Nullable.
* Fixes assertion messages for accuracy and consistency.
* Introduces white spacing for readability.

Closes #2747
2023-10-18 16:32:05 -07:00
John Blum
a71f042ec4 Refine Javadoc and source in caching infrastructure components.
Judiciously applies minor source code refinements, such as introducing named (local) variable object references to make it clearer the arguments that are being passed to caching method parameters, in favor of self-describing code with intent.

Closes #2742
2023-10-17 20:02:56 -07:00
John Blum
31ebe7ea1b Refine tests involving async caching support.
Closes #2741
2023-10-17 20:02:43 -07:00
Greg L. Turnquist
d499c7c224 Update CI properties.
See #2737
2023-10-16 13:28:22 -05:00
John Blum
d9868cf792 After release cleanups.
See #2712
2023-10-13 08:52:01 -07:00
John Blum
ccf21ab5be Prepare next development iteration.
See #2712
2023-10-13 08:51:59 -07:00
John Blum
2546c26675 Release version 3.2 RC1 (2023.1.0).
See #2712
2023-10-13 08:44:25 -07:00
John Blum
b62f18c027 Prepare 3.2 RC1 (2023.1.0).
See #2712
2023-10-13 08:43:56 -07:00
Mark Paluch
917632bd32 Polishing.
Add since tag. Reformat code.

See #2601
2023-10-13 10:36:26 +02:00
Mark Paluch
7bf035f3a5 Allow @EnabledOnRedisDriver usage with @ParameterizedRedisTest.
We now enable tests without an instance in EnabledOnRedisDriverCondition assuming that we only use DriverQualifier on instance fields and not static ones.

Closes #2734
Original pull request: #2717
2023-10-13 09:31:50 +02:00
Mark Paluch
efc9ecf695 Polishing.
Replace blocking lock wait with non-blocking flow. Add support for asynchronous storage to persist the cache value after retrieval from the value supplier. Introduce AsyncCacheWriter abstraction to improve functional guards.

Reformat code. Remove redundant tests. Revisit deprecation notices with consistent mention of the version in which the deprecation was introduced.

Refine exception messages when RedisCache does not support async retrieval.

See #2650
Original pull request: #2717
2023-10-13 09:31:50 +02:00
John Blum
a72c4268a3 Support asynchronous Cache.retrieve(…) in RedisCache.
Closes #2650
Original pull request: #2717
2023-10-13 09:31:19 +02:00
John Blum
9bae67eae2 Deprecate redundant ByteUtils.extractBytes(…) method.
Refactors extractBytes(:ByteBuffer) to call getBytes(:ByteBuffer), thereby avoid the NullPointerException by throwing the more appropriate IllegalArgumentException with a descriptive message instead.

See #2733
2023-10-12 16:21:12 -07:00
John Blum
747a7d03ee Refactor code and cleanup compiler warnings in Redis caching infrastructure.
* Apply Java 17 syntax try-with-resources in DefaultRedisCacheWriter execute methods.
* Organize source code
* Edit Javadoc.

Closes #2733
2023-10-12 16:20:46 -07:00
Mark Paluch
df4be6f8b5 Correctly apply Reactive zadd NX/XX command flags.
We now correctly apply if exists/if not exists constraints on the reactive zadd command.

Previously, we only considered upsert which wasn't sufficient to apply xx/nx.

Closes #2731
2023-10-12 10:09:55 +02:00
John Blum
9bd8fda30e Apply additional polishing to ClusterCommandExecutor.
See #2518
2023-10-11 22:44:34 -07:00
Mark Paluch
07cebd48d0 Polishing.
Remove superfluous versions. Improve make clean by removing stale pid files.

See #2712
2023-10-11 14:46:45 +02:00
Mark Paluch
8be6691c8d Polishing.
Simplify tests. Reuse existing interfaces from Spring. Remove inappropriate nullability annotations and introduce annotations where required.

Replace Future mocking with easier to maintain and to read future method overrides. Remove superfluous code and replace with infrastructure classes provided by Spring Framework.

Consistently name callbacks. Make exception collector concept explicit. Reformat code.

See #2518
Original pull request: #2719
2023-10-11 14:46:39 +02:00
John Blum
781fda6be5 Remove Thread.sleep(…) from ClusterCommandExecutor.collectResults(…).
Replace Thread.sleep(..) with Future.get(timeout, :TimeUnit) for 10 microseconds. As a result, Future.isDone() and Future.isCancelled() are no longer necessary. Simply try to get the results within 10 us, and if a TimeoutException is thrown, then set done to false.

10 microseconds is 1/1000 of 10 milliseconds. This means a Redis cluster with 1000 nodes will run in a similar time to Thread.sleep(10L) if all Futures are blocked waiting for the computation to complete and take an equal amount of time to compute the result, which is rarely the case in practice, given different hardware configurations, data access patterns, load balancing/request routing, and so on. However, using Future.get(timeout, :TimeUnit) is more fair than Future.get(), which blocks until a result is returned or an ExecutionException is thrown, thereby starving computationally faster nodes vs. other nodes in the cluster that might be overloaded. In the meantime, some nodes may even complete in the short amount of time when waiting on a single node to complete.

10 microseconds was partially arbitrary, but no more so than Thread.sleep(10L) (10 milliseconds). The main objective was to give each node a chance to complete the computation in a moments notice balanced with the need to quickly check if the computation is done, hence Future.get(timeout, TimeUnit.MICROSECONDS) for sub-millisecond response times. This may need to be further tuned over time, but should serve as a reasonable baseline for the time being. Additionally, this was based on https://redis.io/docs/reference/cluster-spec/#overview-of-redis-cluster-main-components in the Redis documentation, recommending a cluster size of no more than 1000 nodes.

Add test coverage for ClusterCommandExecutor collectResults(..) method.

Cleanup compiler warnings in ClusterCommandExecutorUnitTests.

Closes #2518
Original pull request: #2719
2023-10-11 14:45:28 +02:00
John Blum
dc0756f94e Polish for Issue #2655 and PR #2672.
See #2655
Original pull request: #2672
2023-10-10 19:07:48 -07:00
Mark Paluch
b5f124cfd8 Terminate stream with error on null values returned by RedisElementReader for top-level elements.
We now emit InvalidDataAccessApiUsageException when a RedisElementReader returns null in the context of a top-level stream to indicate invalid API usage although RedisElementReader.read can generally return null values if these are being collected in a container or value wrapper or parent complex object.

Apply consistent wording to operations documentation.
2023-10-10 19:07:42 -07:00
Christoph Strobl
66b00e286d Update native-image runtime hints.
Closes: #2729
2023-10-09 15:38:15 +02:00
John Blum
6cc1a9158a Update CI properties.
See #2712
2023-10-04 17:24:11 -07:00
John Blum
0adab3cd3e Upgrade to Maven Wrapper 3.9.5.
See #2723
2023-10-04 16:58:12 -07:00
John Blum
2075633809 Upgrade to Jedis 5.0
Adapt to API changes in the Jedis 5.0 driver.
Fix bzPopMaxShouldWorkCorrectly() and bzPopMinShouldWorkCorrectly() tests in JedisClusterConnectionTests.

Jedis 5.0 changed the bzpopmax and bzpopmin Redis commands to no longer return an empty (Array)List internally when evaluating and popping from an empty sorted set. A NullPointerException will be thrown if either bzpopmax or bzpopmin commands are executd on an empty Redis sorted set in Jedis 5.0 (vs. Jedis 4.x):

Closes #2612
Original pull request: #2716
2023-10-04 08:04:37 +02:00
Mark Paluch
d63fd19519 Upgrade to OpenWebBeans 4.0.
Closes #2721
2023-09-29 09:29:51 +02:00
Mark Paluch
49c6637913 Fix broken unit tests.
Closes #2720
2023-09-28 14:41:22 +02:00
John Blum
ff0503cc6f Upgrade to Jedis 4.4.5.
Closes #2718
2023-09-26 13:24:50 -07:00
Mark Paluch
8573104ad8 Reenable disabled tests.
See #2489
2023-09-21 15:24:02 +02:00
Mark Paluch
d4ba034b28 Refine RedisSerializer implementations.
This commit polishes up method ordering, introduces Javadoc where missing and updates nullability annotations and argument names.

Closes #1097
2023-09-21 14:59:23 +02:00
Mark Paluch
468254d0fe After release cleanups.
See #2687
2023-09-15 15:03:16 +02:00
Mark Paluch
1b8d2fee37 Prepare next development iteration.
See #2687
2023-09-15 15:03:16 +02:00
Mark Paluch
892d793243 Release version 3.2 M3 (2023.1.0).
See #2687
2023-09-15 15:03:16 +02:00
Mark Paluch
220eef7ea8 Prepare 3.2 M3 (2023.1.0).
See #2687
2023-09-15 15:03:16 +02:00
Mark Paluch
56bf624bb9 Remove changelog shipped with the binaries.
Closes #2131
2023-09-14 11:19:00 +02:00
John Blum
75eed8f11a Polish for #2690.
Closes #2690
Original pull request: #2691
2023-09-13 11:35:15 -07:00
Mark Paluch
ec4370f060 Polishing.
Add missing Override annotations.

See #2690
2023-09-13 11:33:41 -07:00
Mark Paluch
7fbfd5d439 Use Locks instead of synchronized blocks that run blocking operations.
To avoid thread pinning on virtual thread arrangements we now use ReentrantLock instead of a synchronized block.

Closes #2690
2023-09-13 11:33:24 -07:00
Mark Paluch
307ca5e431 Upgrade to Jedis 4.4.4.
Closes #2708
2023-09-12 15:49:57 +02:00
Mark Paluch
9e473b5dcd Polishing.
Reorder methods to align with ListOperations. Simplify tests to avoid test noise.

See #2692
Original pull request: #2704
2023-09-12 11:09:06 +02:00
John Blum
157f5e4b1d Adds support to lPop or rPop N elements from a Redis List in ReactiveListOperations.
Closes #2692
Original pull request: #2704
2023-09-12 11:08:32 +02:00
John Blum
ea4acad379 Polish enhanced switch statements.
See #2705
Original pull request: #2706
2023-09-11 16:45:59 -07:00
Junghoon Ban
5e23156f78 Change switch statements to switch expressions.
Remove unused default branches.

Closes #2705
Original pull request: #2706
2023-09-11 16:44:10 -07:00
Mark Paluch
68c77b9a69 Polishing.
Use dynamic copyright year.

See #2703
2023-09-11 09:01:09 +02:00
Mark Paluch
001456447b Migrate documentation site to Antora.
Closes #2703
2023-09-08 13:59:16 +02:00
John Blum
e423851f87 Polish for #2696.
Closes #2701
Original pull request: #2696
2023-09-06 17:15:51 -07:00
Mingyuan Wu
b13690c611 Fix wrong asserted code in ConvertingCursor.
Pull Request: #2696
2023-09-06 16:46:15 -07:00
Junghoon Ban
77b2d9e701 Add missing anchor to reference docs.
Closes #2700
2023-09-06 14:15:05 +02:00
Greg L. Turnquist
91056234fd Update CI properties.
See #2687
2023-09-05 13:25:24 -05:00