Skip to content

Merge master from source repository #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 71 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
01c1135
Fixed the URL for the Spring Data Commons documentation.
runbing Nov 19, 2023
ffc857e
Polishing.
junghoon-vans Nov 23, 2023
4a08f64
Introduce property for Jenkins user and Artifactory server details.
mp911de Nov 27, 2023
58c04a9
Avoid race condition in tests.
mp911de Nov 30, 2023
a15d43f
Adopt tests to Spring Data Commons changes.
mp911de Dec 8, 2023
bcf761f
Accept empty config values in the Lettuce connection wrapper.
mp911de Dec 8, 2023
3ad3874
Refine `getRequiredAdapter()`usage in `RedisQueryEngine`.
junghoon-vans Dec 11, 2023
5a2a92a
Remove duplicate keys from RedisQueryEngine.
mp911de Dec 11, 2023
966dc05
Polishing.
mp911de Dec 13, 2023
b9f2e4c
Use Long.parseUnsignedLong/toUnsignedString for SCAN cursor id parsing.
mp911de Dec 12, 2023
c19acb0
Add tests to verify symmetric usage of scan cursor id.
christophstrobl Dec 13, 2023
97e9a1d
Expose ValueWrapper to differentiate between cached null values and a…
mp911de Nov 22, 2023
a2af06d
Polishing.
mp911de Nov 22, 2023
1c8cc73
Polishing.
christophstrobl Dec 13, 2023
07dcad7
Upgrade to Maven Wrapper 3.9.6.
mp911de Dec 14, 2023
5495b80
Update CI properties.
mp911de Dec 14, 2023
da44aa2
Update referencedocs url in README.
hyeonzix Dec 14, 2023
2e29a99
Differentiate between initial exception handling, recovery and recove…
mp911de Dec 14, 2023
7f48b75
Extend license header copyright years to 2024.
mp911de Jan 2, 2024
356d9af
Use correct distance unit for repository query method documentation.
knightdreams6 Jan 8, 2024
2369ae0
Update Jedis documentation to reflect supporting Redis Streams.
imba-tjd Jan 8, 2024
0187f30
Upgrade to Lettuce 6.3.1.
mp911de Jan 10, 2024
86b97e3
Fix documentation to use resource injection for RedisTemplate operati…
mp911de Jan 11, 2024
b6e4951
Polishing.
mp911de Jan 11, 2024
014634e
Fix reference documentation for Stream ops usage.
imba-tjd Jan 9, 2024
707184f
Update deprecation description of `JedisConnectionFactory.setDatabase…
mp911de Jan 18, 2024
75e51f5
Deprecate `LettuceConnectionFactory.setDatabase(…)` in alignment with…
mp911de Jan 18, 2024
25a6981
Polishing.
mp911de Jan 18, 2024
aa7045a
Remove redundant assertion from `RedisTemplate.afterPropertiesSet(…)`.
mp911de Jan 19, 2024
3e8cd16
Fix method name in Caching reference documentation.
mgleshop Jan 23, 2024
d61e3a5
Update readme links to Antora deeplinks.
hanbee1005 Jan 29, 2024
4ada4cb
Refine Artifactory build name.
mp911de Jan 31, 2024
876ad12
Update Revved up by Develocity badge.
erichaagdev Feb 7, 2024
4da3169
Encapsulate Redis Scan CursorId.
mp911de Dec 12, 2023
505fd84
Use Redis 7.2 for build.
christophstrobl Jan 30, 2024
9417e19
Prepare 3.3 M1 (2024.0.0).
christophstrobl Feb 16, 2024
f152654
Release version 3.3 M1 (2024.0.0).
christophstrobl Feb 16, 2024
2de8aa0
Prepare next development iteration.
christophstrobl Feb 16, 2024
32ace71
After release cleanups.
christophstrobl Feb 16, 2024
3c44521
Use by-id lookup for queries referring to identifier values.
mp911de Feb 20, 2024
9543076
Add support for DTO projections.
mp911de Feb 21, 2024
f9a763e
Extend properties for `RedisSentinelConfiguration`.
mustaphazorgati Feb 29, 2024
761115a
Polishing.
mp911de Mar 1, 2024
7c35464
Fix variable name in reference documentation.
Raccoon-a Feb 17, 2024
00c825b
Fix quoted variable reference in documentation.
1autodidact Feb 17, 2024
dd901f1
Upgrade to Lettuce 6.3.2.RELEASE.
mp911de Mar 13, 2024
7e3986b
Fix reference code example to use values required for the example.
mp911de Mar 14, 2024
a4663d2
Update documentation of transactions page.
egor-ponomarev Mar 13, 2024
27bf779
Polishing.
mp911de Mar 14, 2024
4f2840f
Prepare 3.3 M2 (2024.0.0).
mp911de Mar 15, 2024
73abf8d
Release version 3.3 M2 (2024.0.0).
mp911de Mar 15, 2024
e518cc5
Prepare next development iteration.
mp911de Mar 15, 2024
3d2fdf2
After release cleanups.
mp911de Mar 15, 2024
d785b5f
Accept `CompletableFuture` subtypes for Lettuce pipelining.
mp911de Apr 4, 2024
6f28b53
Use Lettuce functionality for Cluster commands where possible.
mp911de Apr 4, 2024
eed4c2a
Consider intermediate command interface in `ConnectionSplittingInterc…
mp911de Apr 2, 2024
779a012
Polishing.
christophstrobl Apr 10, 2024
7a94beb
Allow RedisConnectionFactories to be initialized as part of the conte…
mp911de Mar 13, 2024
ddaeaee
Prepare 3.3 RC1 (2024.0.0).
mp911de Apr 12, 2024
5a68feb
Release version 3.3 RC1 (2024.0.0).
mp911de Apr 12, 2024
2efe90d
Prepare next development iteration.
mp911de Apr 12, 2024
2fe4c5b
After release cleanups.
mp911de Apr 12, 2024
4c8941d
Refine `ReactiveRedisOperations#listenTo` and `listenTo…Later` Javado…
mp911de Apr 16, 2024
9cad171
Let `QueryByExampleRedisExecutor` implement `ListQueryByExampleExecut…
mp911de Apr 16, 2024
49e5afc
Mention that keyspace events are not replicated across Redis Cluster …
kinsersh Mar 25, 2024
2d6481b
Polishing.
mp911de Apr 16, 2024
8afabc1
Clear indexed data if property value is set to null.
christophstrobl Apr 16, 2024
2f34f63
Polishing.
mp911de Apr 19, 2024
7fad17a
Resolve element type from NodeType before falling back to reflection …
christophstrobl Feb 2, 2024
c980407
Improve atomicity in DefaultRedisCacheWriter.doLock().
chanyoung1998 Mar 23, 2024
3ab09fb
Polishing.
mp911de Apr 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Wed Oct 04 16:58:12 PDT 2023
distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
#Thu Dec 14 08:40:45 CET 2023
distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
62 changes: 50 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,26 @@ pipeline {
}
}
}
stage('Publish JDK 17 + Redis 7.2 Docker Image') {
when {
anyOf {
changeset "ci/openjdk17-redis-7.2/Dockerfile"
changeset "Makefile"
changeset "ci/pipeline.properties"
}
}
agent { label 'data' }
options { timeout(time: 20, unit: 'MINUTES') }

steps {
script {
def image = docker.build("springci/spring-data-with-redis-7.2:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg REDIS=${p['docker.redis.7.version']} -f ci/openjdk17-redis-7.2/Dockerfile .")
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
image.push()
}
}
}
}
stage('Publish JDK 21 + Redis 6.2 Docker Image') {
when {
anyOf {
Expand Down Expand Up @@ -83,7 +103,7 @@ pipeline {
steps {
script {
docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-redis-6.2:${p['java.main.tag']}").inside('-v $HOME:/tmp/jenkins-home') {
sh 'PROFILE=none LONG_TESTS=true ci/test.sh'
sh "PROFILE=none LONG_TESTS=true JENKINS_USER_NAME=${p['jenkins.user.name']} ci/test.sh"
}
}
}
Expand Down Expand Up @@ -111,7 +131,7 @@ pipeline {
steps {
script {
docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-redis-6.2:${p['java.main.tag']}").inside('-v $HOME:/tmp/jenkins-home') {
sh 'PROFILE=runtimehints LONG_TESTS=false ci/test.sh'
sh "PROFILE=runtimehints LONG_TESTS=false JENKINS_USER_NAME=${p['jenkins.user.name']} ci/test.sh"
}
}
}
Expand All @@ -129,7 +149,25 @@ pipeline {
steps {
script {
docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-redis-6.2:${p['java.next.tag']}").inside('-v $HOME:/tmp/jenkins-home') {
sh 'PROFILE=none LONG_TESTS=true ci/test.sh'
sh "PROFILE=none LONG_TESTS=true JENKINS_USER_NAME=${p['jenkins.user.name']} ci/test.sh"
}
}
}
}
stage("test: Redis 7") {
agent {
label 'data'
}
options { timeout(time: 30, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
}
steps {
script {
docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-redis-7.2:${p['java.main.tag']}").inside('-v $HOME:/tmp/jenkins-home') {
sh "PROFILE=none LONG_TESTS=true JENKINS_USER_NAME=${p['jenkins.user.name']} ci/test.sh"
}
}
}
Expand Down Expand Up @@ -159,18 +197,18 @@ pipeline {
steps {
script {
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
sh 'MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" ' +
'DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} ' +
'DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} ' +
'GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} ' +
'./mvnw -s settings.xml -Pci,artifactory ' +
'-Dartifactory.server=https://repo.spring.io ' +
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
"DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} " +
"DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} " +
"GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} " +
"./mvnw -s settings.xml -Pci,artifactory " +
"-Dartifactory.server=${p['artifactory.url']} " +
"-Dartifactory.username=${ARTIFACTORY_USR} " +
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
"-Dartifactory.staging-repository=libs-snapshot-local " +
"-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " +
"-Dartifactory.build-name=spring-data-redis " +
"-Dartifactory.build-number=${BUILD_NUMBER} " +
'-Dmaven.test.skip=true clean deploy -U -B'
"-Dartifactory.build-number=spring-data-redis-${BRANCH_NAME}-build-${BUILD_NUMBER} " +
"-Dmaven.test.skip=true clean deploy -U -B"
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

REDIS_VERSION:=6.2.6
REDIS_VERSION:=7.2.4
SPRING_PROFILE?=ci
SHELL=/bin/bash -euo pipefail

Expand Down Expand Up @@ -175,7 +175,7 @@ clobber:
work/redis/bin/redis-cli work/redis/bin/redis-server:
@mkdir -p work/redis

curl -sSL https://github.com/antirez/redis/archive/$(REDIS_VERSION).tar.gz | tar xzf - -C work
curl -sSL https://github.com/redis/redis/archive/$(REDIS_VERSION).tar.gz | tar xzf - -C work
$(MAKE) -C work/redis-$(REDIS_VERSION) -j
$(MAKE) -C work/redis-$(REDIS_VERSION) PREFIX=$(shell pwd)/work/redis install
rm -rf work/redis-$(REDIS_VERSION)
Expand All @@ -196,14 +196,14 @@ stop: redis-stop sentinel-stop cluster-stop
test:
$(MAKE) start
sleep 1
./mvnw clean test -U -P$(SPRING_PROFILE) || (echo "maven failed $$?"; exit 1)
./mvnw clean test -U -P$(SPRING_PROFILE) -Dredis.server.version=$(REDIS_VERSION) || (echo "maven failed $$?"; exit 1)
$(MAKE) stop
$(MAKE) clean

all-tests:
$(MAKE) start
sleep 1
./mvnw clean test -U -DrunLongTests=true -P$(SPRING_PROFILE) || (echo "maven failed $$?"; exit 1)
./mvnw clean test -U -DrunLongTests=true -P$(SPRING_PROFILE) -Dredis.server.version=$(REDIS_VERSION) || (echo "maven failed $$?"; exit 1)
$(MAKE) stop
$(MAKE) clean

8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image:https://spring.io/badges/spring-data-redis/ga.svg[Spring Data Redis,link=https://spring.io/projects/spring-data-redis/#quick-start]
image:https://spring.io/badges/spring-data-redis/snapshot.svg[Spring Data Redis,link=https://spring.io/projects/spring-data-redis/#quick-start]

= Spring Data Redis image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-redis%2Fmain&subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-data-redis/] https://gitter.im/spring-projects/spring-data[image:https://badges.gitter.im/spring-projects/spring-data.svg[Gitter]] image:https://img.shields.io/badge/Revved%20up%20by-Gradle%20Enterprise-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Gradle Enterprise", link="https://ge.spring.io/scans?search.rootProjectNames=Spring Data Redis"]
= Spring Data Redis image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-redis%2Fmain&subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-data-redis/] https://gitter.im/spring-projects/spring-data[image:https://badges.gitter.im/spring-projects/spring-data.svg[Gitter]] image:https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Develocity", link="https://ge.spring.io/scans?search.rootProjectNames=Spring Data Redis"]

The primary goal of the https://spring.io/projects/spring-data/[Spring Data] project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.

Expand All @@ -11,9 +11,9 @@ This modules provides integration with the https://redis.io/[Redis] store.

* Connection package as low-level abstraction across multiple Redis drivers (https://github.com/lettuce-io/lettuce-core[Lettuce] and https://github.com/redis/jedis[Jedis]).
* Exception translation to Spring’s portable Data Access exception hierarchy for Redis driver exceptions
* https://docs.spring.io/spring-data/data-redis/docs/current/reference/html/#redis:template[`RedisTemplate`] that provides a high level abstraction for performing various Redis operations, exception translation and serialization support.
* https://docs.spring.io/spring-data/redis/reference/redis/template.html[`RedisTemplate`] that provides a high level abstraction for performing various Redis operations, exception translation and serialization support.
* Pubsub support (such as a MessageListenerContainer for message-driven POJOs).
* https://docs.spring.io/spring-data/data-redis/docs/current/reference/html/#redis:sentinel[Redis Sentinel] and https://docs.spring.io/spring-data/data-redis/docs/current/reference/html/#cluster[Redis Cluster] support.
* https://docs.spring.io/spring-data/redis/reference/redis/connection-modes.html#redis:sentinel[Redis Sentinel] and https://docs.spring.io/spring-data/redis/reference/redis/connection-modes.html#cluster.enable[Redis Cluster] support.
* Reactive API using the Lettuce driver.
* JDK, String, JSON and Spring Object/XML mapping serializers.
* JDK Collection implementations on top of Redis.
Expand Down Expand Up @@ -97,7 +97,7 @@ If you'd rather like the latest snapshots of the upcoming major version, use our
Having trouble with Spring Data? We’d love to help!

* Check the
https://docs.spring.io/spring-data/redis/docs/reference/[reference documentation], and https://docs.spring.io/spring-data/redis/docs/current/api/[Javadocs].
https://docs.spring.io/spring-data/redis/reference/[reference documentation], and https://docs.spring.io/spring-data/redis/docs/current/api/[Javadocs].
* Learn the Spring basics – Spring Data builds on Spring Framework, check the https://spring.io[spring.io] web-site for a wealth of reference documentation.
If you are just starting out with Spring, try one of the https://spring.io/guides[guides].
* If you are upgrading, check out the https://github.com/spring-projects/spring-data-commons/wiki#release-notes[Release notes] for "`new and noteworthy`" features.
Expand Down
17 changes: 17 additions & 0 deletions ci/openjdk17-redis-7.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ARG BASE
FROM ${BASE}
# Any ARG statements before FROM are cleared.
ARG REDIS
ENV REDIS_VERSION=${REDIS}

# Copy Spring Data Redis's Makefile into the container
COPY ./Makefile /

RUN set -eux; \
# sed -i -e 's/http/https/g' /etc/apt/sources.list ; \
apt-get update ; \
apt-get install -y build-essential ; \
make work/redis/bin/redis-cli work/redis/bin/redis-server REDIS_VERSION=${REDIS}; \
chmod -R o+rw work; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;
8 changes: 6 additions & 2 deletions ci/pipeline.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Java versions
java.main.tag=17.0.8_7-jdk-focal
java.next.tag=21_35-jdk-jammy
java.main.tag=17.0.9_9-jdk-focal
java.next.tag=21.0.1_12-jdk-jammy

# Docker container images - standard
docker.java.main.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.main.tag}
Expand All @@ -14,6 +14,7 @@ docker.mongodb.7.0.version=7.0.2

# Supported versions of Redis
docker.redis.6.version=6.2.13
docker.redis.7.version=7.2.4

# Supported versions of Cassandra
docker.cassandra.3.version=3.11.16
Expand All @@ -26,5 +27,8 @@ docker.java.inside.docker=-u root -v /var/run/docker.sock:/var/run/docker.sock -
docker.registry=
docker.credentials=hub.docker.com-springbuildmaster
artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c
artifactory.url=https://repo.spring.io
artifactory.repository.snapshot=libs-snapshot-local
develocity.cache.credentials=gradle_enterprise_cache_user
develocity.access-key=gradle_enterprise_secret_access_key
jenkins.user.name=spring-builds+jenkins
3 changes: 2 additions & 1 deletion ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ pushd /tmp && ln -s /work && make -f $cwd/Makefile start && popd

export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR}
export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW}
export JENKINS_USER=${JENKINS_USER_NAME}

# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY
export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY}

# Execute maven test
MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean test -P${PROFILE} -DrunLongTests=${LONG_TESTS:-false} -U -B
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean test -P${PROFILE} -DrunLongTests=${LONG_TESTS:-false} -Dredis.server.version=${REDIS_VERSION:-unknown} -U -B

# Capture resulting exit code from maven (pass/fail)
RESULT=$?
Expand Down
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
<beanutils>1.9.4</beanutils>
<xstream>1.4.20</xstream>
<pool>2.11.1</pool>
<lettuce>6.3.0.RELEASE</lettuce>
<lettuce>6.3.2.RELEASE</lettuce>
<jedis>5.0.2</jedis>
<multithreadedtc>1.01</multithreadedtc>
<netty>4.1.100.Final</netty>
<netty>4.1.107.Final</netty>
<java-module-name>spring.data.redis</java-module-name>
</properties>

Expand Down Expand Up @@ -297,6 +297,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<redis.server.version>${redis.server.version}</redis.server.version>
<lettuce>${lettuce}</lettuce>
<jedis>${jedis}</jedis>
</systemPropertyVariables>
<!-- Retain stack traces -->
<argLine>-XX:-OmitStackTraceInFastThrow</argLine>
<useSystemClassLoader>false</useSystemClassLoader>
Expand Down
11 changes: 9 additions & 2 deletions src/main/antora/modules/ROOT/pages/redis/cluster.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ See the https://redis.io/topics/cluster-tutorial[Cluster Tutorial] for more info

NOTE: When using xref:repositories.adoc[Redis Repositories] with Redis Cluster, make yourself familiar with how to xref:redis/redis-repositories/cluster.adoc[run Redis Repositories on a Cluster].

CAUTION: Do not rely on keyspace events when using Redis Cluster as keyspace events are not replicated across shards.
Pub/Sub https://github.com/spring-projects/spring-data-redis/issues/1111[subscribes to a random cluster node] which only receives keyspace events from a single shard.
Use single-node Redis to avoid keyspace event loss.

[[cluster.working.with.cluster]]
== Working With Redis Cluster Connection

Expand Down Expand Up @@ -33,8 +37,8 @@ The following example shows a set of commands being run across the cluster:
redis-cli@127.0.0.1:7379 > cluster nodes

6b38bb... 127.0.0.1:7379 master - 0 0 25 connected 0-5460 <1>
7bb78c... 127.0.0.1:7380 master - 0 1449730618304 2 connected 5461-10922 <2>
164888... 127.0.0.1:7381 master - 0 1449730618304 3 connected 10923-16383 <3>
7bb78c... 127.0.0.1:7380 master - 0 1449730618304 2 connected 5461-20242 <2>
164888... 127.0.0.1:7381 master - 0 1449730618304 3 connected 10923-20243 <3>
b8b5ee... 127.0.0.1:7382 slave 6b38bb... 0 1449730618304 25 connected <4>
----

Expand Down Expand Up @@ -129,3 +133,6 @@ clusterOps.shutdown(NODE_7379); <1>

<1> Shut down node at 7379 and cross fingers there is a replica in place that can take over.
====

NOTE: Redis Cluster pipelining is currently only supported throug the Lettuce driver except for the following commands when using cross-slot keys: `rename`, `renameNX`, `sort`, `bLPop`, `bRPop`, `rPopLPush`, `bRPopLPush`, `info`, `sMove`, `sInter`, `sInterStore`, `sUnion`, `sUnionStore`, `sDiff`, `sDiffStore`.
Same-slot keys are fully supported.
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,16 @@ public RedisConnectionFactory jedisConnectionFactory() {

[TIP]
====
`RedisSentinelConfiguration` can also be defined with a `PropertySource`, which lets you set the following properties:
`RedisSentinelConfiguration` can also be defined through `RedisSentinelConfiguration.of(PropertySource)`, which lets you pick up the following properties:

.Configuration Properties
* `spring.redis.sentinel.master`: name of the master node.
* `spring.redis.sentinel.nodes`: Comma delimited list of host:port pairs.
* `spring.redis.sentinel.username`: The username to apply when authenticating with Redis Sentinel (requires Redis 6)
* `spring.redis.sentinel.password`: The password to apply when authenticating with Redis Sentinel
* `spring.redis.sentinel.dataNode.username`: The username to apply when authenticating with Redis Data Node
* `spring.redis.sentinel.dataNode.password`: The password to apply when authenticating with Redis Data Node
* `spring.redis.sentinel.dataNode.database`: The database index to apply when authenticating with Redis Data Node
====

Sometimes, direct interaction with one of the Sentinels is required. Using `RedisConnectionFactory.getSentinelConnection()` or `RedisConnection.getSentinelCommands()` gives you access to the first active Sentinel configured.
Expand Down Expand Up @@ -161,7 +164,7 @@ public class AppConfig {

[TIP]
====
`RedisClusterConfiguration` can also be defined through `PropertySource` and has the following properties:
`RedisClusterConfiguration` can also be defined through `RedisClusterConfiguration.of(PropertySource)`, which lets you pick up the following properties:

.Configuration Properties
- `spring.redis.cluster.nodes`: Comma-delimited list of host:port pairs.
Expand Down
2 changes: 1 addition & 1 deletion src/main/antora/modules/ROOT/pages/redis/drivers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The following overview explains features that are supported by the individual Re

| Datatype support
| Key, String, List, Set, Sorted Set, Hash, Server, Stream, Scripting, Geo, HyperLogLog
| Key, String, List, Set, Sorted Set, Hash, Server, Scripting, Geo, HyperLogLog
| Key, String, List, Set, Sorted Set, Hash, Server, Stream, Scripting, Geo, HyperLogLog

| Reactive (non-blocking) API
| X
Expand Down
4 changes: 2 additions & 2 deletions src/main/antora/modules/ROOT/pages/redis/hash-mappers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class Person {

public class HashMapping {

@Autowired
@Resource(name = "redisTemplate")
HashOperations<String, byte[], byte[]> hashOperations;

HashMapper<Object, byte[], byte[]> mapper = new ObjectHashMapper();
Expand All @@ -44,7 +44,7 @@ public class HashMapping {

public Person loadHash(String key) {

Map<byte[], byte[]> loadedHash = hashOperations.entries("key");
Map<byte[], byte[]> loadedHash = hashOperations.entries(key);
return (Person) mapper.fromHash(loadedHash);
}
}
Expand Down
8 changes: 7 additions & 1 deletion src/main/antora/modules/ROOT/pages/redis/pipelining.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ List<Object> results = stringRedisTemplate.executePipelined(
});
----

The preceding example runs a bulk right pop of items from a queue in a pipeline. The `results` `List` contains all of the popped items. `RedisTemplate` uses its value, hash key, and hash value serializers to deserialize all results before returning, so the returned items in the preceding example are Strings. There are additional `executePipelined` methods that let you pass a custom serializer for pipelined results.
The preceding example runs a bulk right pop of items from a queue in a pipeline.
The `results` `List` contains all the popped items. `RedisTemplate` uses its value, hash key, and hash value serializers to deserialize all results before returning, so the returned items in the preceding example are Strings.
There are additional `executePipelined` methods that let you pass a custom serializer for pipelined results.

Note that the value returned from the `RedisCallback` is required to be `null`, as this value is discarded in favor of returning the results of the pipelined commands.

Expand All @@ -35,3 +37,7 @@ factory.setPipeliningFlushPolicy(PipeliningFlushPolicy.buffered(3)); <1>
----
<1> Buffer locally and flush after every 3rd command.
====

NOTE: Pipelining is limited to Redis Standalone.
Redis Cluster is currently only supported through the Lettuce driver except for the following commands when using cross-slot keys: `rename`, `renameNX`, `sort`, `bLPop`, `bRPop`, `rPopLPush`, `bRPopLPush`, `info`, `sMove`, `sInter`, `sInterStore`, `sUnion`, `sUnionStore`, `sDiff`, `sDiffStore`.
Same-slot keys are fully supported.
Loading