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

Cannot convert to RedisValue: MultiBulk #2694

Open
WeihanLi opened this issue Apr 10, 2024 · 3 comments
Open

Cannot convert to RedisValue: MultiBulk #2694

WeihanLi opened this issue Apr 10, 2024 · 3 comments

Comments

@WeihanLi
Copy link
Contributor

WeihanLi commented Apr 10, 2024

exception stack trace:

System.InvalidCastException: Cannot convert to RedisValue: MultiBulk at StackExchange.Redis.RawResult.AsRedisValue() in //src/StackExchange.Redis/RawResult.cs:line 173 at StackExchange.Redis.ResultProcessor.StreamProcessorBase1.ParseStreamEntryValues(RawResult& result) in /_/src/StackExchange.Redis/ResultProcessor.cs:line 2025 at StackExchange.Redis.ResultProcessor.StreamProcessorBase1.ParseRedisStreamEntry(RawResult& item) in //src/StackExchange.Redis/ResultProcessor.cs:line 1968 at Pipelines.Sockets.Unofficial.Arenas.SequenceExtensions.TryCopyTo[TFrom,TState,TTo](Sequence1& source, Span1 destination, Projection3 projection, TState& state) in /_/src/Pipelines.Sockets.Unofficial/Arenas/SequenceExtensions.cs:line 324 at Pipelines.Sockets.Unofficial.Arenas.SequenceExtensions.CopyTo[TFrom,TState,TTo](Sequence1& source, Span1 destination, Projection3 projection, TState& state) in //src/Pipelines.Sockets.Unofficial/Arenas/SequenceExtensions.cs:line 200 at Pipelines.Sockets.Unofficial.Arenas.SequenceExtensions.ToArray[TFrom,TState,TTo](Sequence1& source, Projection3 projection, TState& state) in //src/Pipelines.Sockets.Unofficial/Arenas/SequenceExtensions.cs:line 174 at StackExchange.Redis.ResultProcessor.StreamProcessorBase1.ParseRedisStreamEntries(RawResult& result) in /_/src/StackExchange.Redis/ResultProcessor.cs:line 1982 at StackExchange.Redis.ResultProcessor.SingleStreamProcessor.SetResultCore(PhysicalConnection connection, Message message, RawResult& result) in /_/src/StackExchange.Redis/ResultProcessor.cs:line 1552 at StackExchange.Redis.ResultProcessor.SetResult(PhysicalConnection connection, Message message, RawResult& result) in /_/src/StackExchange.Redis/ResultProcessor.cs:line 268 at StackExchange.Redis.Message.ComputeResult(PhysicalConnection connection, RawResult& result) in /_/src/StackExchange.Redis/Message.cs:line 623 --- End of stack trace from previous location --- at RedisStreamCacheUpdater1.GetLatestMsgId()

it may relate to #2117

the operation in GetLastestMsgId is trying to the last entry message id in a stream

var latestMsg = await db.StreamRangeAsync(_typedCacheConfig.Subscription, count: 1, messageOrder: Order.Descending);
return latestMsg.Length > 0 ? ((string?)latestMsg[0].Id) : string.Empty;

Redis server version: 6.0.5
StackExchange.Redis version: 2.2.4 on .NET 6

@mjgaux
Copy link

mjgaux commented Apr 10, 2024

it will be unrelated to 2117 - that's a separate connection and scenario; is this repeatable, i.e. can you repro this reliably on demand? or is this very rare and hard to repro?

@mgravell
Copy link
Collaborator

For clarification; ^^^ is also me; I'm testing options to help with the "MSFT touched my GitHub account and now I can't see half of them" single-signin problem.

@WeihanLi
Copy link
Contributor Author

happened on production, and failed to reproduce in my local environment

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

3 participants