Skip to content

Commit b4dcdf5

Browse files
committed
Document Redis Cluster limitation
1 parent fd17515 commit b4dcdf5

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

  • docs/guides/integrations/redis/redis_session_service
  • src/google/adk/integrations/redis

‎docs/guides/integrations/redis/redis_session_service/index.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ service = RedisSessionService(redis_client=shared_client)
123123
RedisSessionService requires the `redis` Python package to be installed. You
124124
can install it using `pip install google-adk[redis]`.
125125

126+
Native Redis Cluster is not supported. When an event updates `app:` or `user:`
127+
state, the service watches the session and state keys in one transaction. These
128+
keys are not guaranteed to share a Cluster hash slot, so the transaction can
129+
fail with `CROSSSLOT`. Use a standalone Redis instance for this service.
130+
126131
State keys prefixed with `temp:` are treated as transient. While they are
127132
available in the session object immediately after creation or an update, they
128133
are not persisted to Redis and will disappear when the session is reloaded

‎src/google/adk/integrations/redis/README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ client = redis_asyncio.Redis.from_url(
102102
session_service = RedisSessionService(redis_client=client)
103103
```
104104

105+
Native Redis Cluster is not supported. When an event updates `app:` or `user:`
106+
state, the service watches the session and state keys in one transaction. These
107+
keys are not guaranteed to share a Cluster hash slot, so the transaction can
108+
fail with `CROSSSLOT`. Use a standalone Redis instance for this service.
109+
105110
## Key Schema & State Scoping
106111

107112
`RedisSessionService` stores session data and state using the following Redis key structure:

0 commit comments

Comments
 (0)