Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

读取redis抛InvalidCastException #499

Open
qingxuanjiao opened this issue Dec 15, 2023 · 1 comment
Open

读取redis抛InvalidCastException #499

qingxuanjiao opened this issue Dec 15, 2023 · 1 comment

Comments

@qingxuanjiao
Copy link

你好,有个问题想咨询下。
我们在项目里使用到了CsRedis做为Redis工具类,有个场景是会有循环查询redis多个key的情况。我们压测时发现有8%的几率会抛出以下异常:
---> System.InvalidCastException: Unable to cast object of type 'System.Boolean' to type 'System.String'.
at CSRedis.CSRedisClient.GetAndExecuteAsync[T](RedisClientPool pool, Func2 handerAsync, Int32 jump, Int32 errtimes) at CSRedis.CSRedisClient.ExecuteScalarAsync[T](String key, Func3 handerAsync)

想咨询下导致出现这个异常的原因是什么?如果改成批量读取是否能避免这个问题?

希望能得到解答,谢谢!

@2881099
Copy link
Owner

2881099 commented Dec 16, 2023

请使用重新开发的 FreeRedis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants