Skip to content

Commit

Permalink
Fix long key parsing in DefaultStreamIdMapper (#8378)
Browse files Browse the repository at this point in the history
Co-authored-by: b.nichvolodov <[email protected]>
  • Loading branch information
nichvolodov and b.nichvolodov authored Apr 11, 2023
1 parent e0bb170 commit 20cf814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Orleans.Streaming/Core/DefaultStreamIdMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private static IdSpan GetGuidKey(StreamId streamId, bool includeNamespaceInGrain
private static IdSpan GetIntegerKey(StreamId streamId, bool includeNamespaceInGrainId)
{
var key = streamId.Key.Span;
if (!Utf8Parser.TryParse(key, out int intKey, out var len) || len < key.Length) throw new ArgumentException(nameof(streamId));
if (!Utf8Parser.TryParse(key, out long intKey, out var len) || len < key.Length) throw new ArgumentException(nameof(streamId));

return includeNamespaceInGrainId
? GrainIdKeyExtensions.CreateIntegerKey(intKey, streamId.Namespace.Span)
Expand Down

0 comments on commit 20cf814

Please sign in to comment.