agentscope-ai / agentscope-ai/agentscope-java

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

オープン
#3,085 コメント 3 件 リアクション 0 件 担当者 1 名 @rudy2steiner が担当を希望しています GitHub で見る
area/ext/memory bug
主要言語
Java
スター
5.6k
フォーク
1.3k
平均マージ
4日 12時間
マージ済み PR(30日)
77

説明

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]

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。