agentscope-ai / agentscope-ai/agentscope-java

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

Đang mở
#3,085 3 bình luận 0 reaction 1 người được giao Được @rudy2steiner nhận Xem trên GitHub
area/ext/memory bug
Ngôn ngữ chính
Java
Star
5.6k
Fork
1.3k
Merge trung bình
4 ngày 12 giờ
Pull request đã merge (30 ngày)
77

Mô tả

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]

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.