When a fragment is overwritten in ScaleoutStore, we update _minMappingId with this code:
|
// Move the minimum id when we overwrite |
|
if (overwrite) |
|
{ |
|
_minMessageId = (long)(existingFragment.MaxId + 1); |
|
_minMappingId = existingFragment.MaxId; |
|
} |
|
else if (idxIntoFragmentsArray == 0) |
|
{ |
|
_minMappingId = mapping.Id; |
|
} |
However, existingFragment.MaxId is a Message ID not a Mapping ID!
This _minMappingId value is used to detect a really old cursor (older than the oldest mapping in the store) here:
|
// If we're expired or we're at the first mapping or we're lower than the |
|
// min then get everything |
|
if (mappingId < _minMappingId || mappingId == UInt64.MaxValue) |
|
{ |
|
return GetAllMessages(minMessageId); |
|
} |
Once Mapping IDs go over 65,535, this completely breaks and any client with a cursor below the current minimum mapping is completely unable to get any new messages.
When a fragment is overwritten in
ScaleoutStore, we update_minMappingIdwith this code:SignalR/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStore.cs
Lines 163 to 172 in c24e26f
However,
existingFragment.MaxIdis a Message ID not a Mapping ID!This
_minMappingIdvalue is used to detect a really old cursor (older than the oldest mapping in the store) here:SignalR/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStore.cs
Lines 291 to 296 in c24e26f
Once Mapping IDs go over
65,535, this completely breaks and any client with a cursor below the current minimum mapping is completely unable to get any new messages.