agentscope-ai / agentscope-ai/agentscope-java

[Bug]: After upgrading to version 2.0.3, there was an error when writing to the Redis cluster.

Aperta
#3,085 3 commenti 0 reazioni 1 assegnatario Rivendicata da @rudy2steiner Vedi su GitHub
area/ext/memory bug
Lingua principale
Java
Stelle
5.6k
Fork
1.3k
Merge medio
4g 12h
PR unite (30g)
77

Descrizione

After upgrading to version 2.0.3, there was an error when writing to the Redis cluster.
**Describe the bug**
The AgentScope 2.0.2 version is operating normally. Only upgrading AgentScope to 2.0.3 without modifying any business or Redis cluster-related configurations resulted in errors when writing to the Redis cluster after the upgrade.

**To Reproduce**
The store is using this: DistributedStore store = RedisDistributedStore.fromJedis(getJedisCluster(), agentScopeProperties.getRedis().getKeyPrefix());

**Expected behavior**
A clear and concise description of what you expected to happen.

**Error messages**
系统异常

java.lang.RuntimeException: Failed to save state if version: agent_state
at io.agentscope.extensions.redis.state.RedisAgentStateStore.saveIfVersion(RedisAgentStateStore.java:289)
at io.agentscope.core.ReActAgent.persistAgentStateCas(ReActAgent.java:557)
at io.agentscope.core.ReActAgent.lambda$saveStateToSession$1(ReActAgent.java:485)
at reactor.core.publisher.MonoRunnable.subscribe(MonoRunnable.java:49)
at reactor.core.publisher.Mono.subscribe(Mono.java:4569)
at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:127)
at io.opentelemetry.instrumentation.reactor.v3_1.ContextPropagationOperator$RunnableWrapper.run(ContextPropagationOperator.java:374)
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:90)
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:309)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.base/java.lang.Thread.run(Thread.java:1474)
Caused by: redis.clients.jedis.exceptions.JedisClusterOperationException: Keys must belong to same hashslot.
at redis.clients.jedis.ClusterCommandArguments.processKey(ClusterCommandArguments.java:36)
at redis.clients.jedis.CommandArguments.key(CommandArguments.java:131)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at redis.clients.jedis.CommandArguments.keys(CommandArguments.java:161)
at redis.clients.jedis.CommandObjects.eval(CommandObjects.java:3114)
at redis.clients.jedis.UnifiedJedis.eval(UnifiedJedis.java:4019)
at io.agentscope.extensions.redis.state.jedis.JedisClientAdapter.evalScript(JedisClientAdapter.java:173)
at io.agentscope.extensions.redis.state.RedisAgentStateStore.saveIfVersion(RedisAgentStateStore.java:283)
... 13 common frames omitted

**Environment (please complete the following information):**

- AgentScope-Java Version: [2.0.3]
- Java Version: [21]
- OS: [ windows10]

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.