Describe the bug
Redis Cluster 模式下,多 key 的 Lua 脚本 (EVAL) 要求所有 key 哈希到同一 slot,否则抛出 CROSSSLOT Keys in request don't hash to the same slot。
- redis cluster
- agentStateStore.save(userId, conversationId, "agent_state", state);
- org.redisson.client.RedisException: CROSSSLOT Keys in request don't hash to the same slot.
To Reproduce
Steps to reproduce the behavior:
@bean
public AgentStateStore agentStateStore(RedissonClient redissonClient){
return RedisAgentStateStore.builder()
.redissonClient(redissonClient)
.keyPrefix("sa:session:")
.build();
}
agentStateStore.save(userId, conversationId, "agent_state", state);
Environment (please complete the following information):
- AgentScope-Java Version: 2.0.1-SNAPSHOT
- Java Version: 21
- OS: windows
Describe the bug
Redis Cluster 模式下,多 key 的 Lua 脚本 (EVAL) 要求所有 key 哈希到同一 slot,否则抛出 CROSSSLOT Keys in request don't hash to the same slot。
To Reproduce
Steps to reproduce the behavior:
@bean
public AgentStateStore agentStateStore(RedissonClient redissonClient){
return RedisAgentStateStore.builder()
.redissonClient(redissonClient)
.keyPrefix("sa:session:")
.build();
}
agentStateStore.save(userId, conversationId, "agent_state", state);
Environment (please complete the following information):