-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Sequence reached end, reader can not provide more buffer. #349
Comments
First, as a premise, are you talking about MemoryPackStreamingSerializer? |
correct, @neuecc - the streaming is ideal for my use case. I can confirm that the issue does not exist if I use the |
just wanted to follow up @neuecc - are the streaming apis just not an option for serializing/deserializing strings of unbounded length? is there a possibility of a future update that may add this capability? |
From an implementation perspective, since co-deserializers for each type cannot return success/failure status, they immediately throw exceptions when they fail. |
Hello,
This is more of a question and less of an issue. First, some context:
I'm working through a project that uses a queue to throttle how many stored procedures may be executed on the database concurrently. if too many sprocs run at once (these are very intensive sprocs) the database resources become fully-consumed and things grind to a halt. when a queued stored procedure completes, the results must be stored off for later retrieval by whatever queued the sproc in the first place - claim-check pattern.
I was hoping to use this project to [de]serialize the sproc results into storage as part of that claim-check pattern. however, I've run into the exception mentioned in this issue's title:
An exception of type 'MemoryPack.MemoryPackSerializationException' occurred in MemoryPack.Core.dll but was not handled in user code: 'Sequence reached end, reader can not provide more buffer.'
It looks like a few other people have run into this issue as well, and the suggestion has been to increase the read buffer size due to deserializing some very large strings.
I also have some very long strings. my sproc results include column data that is typed
nvarchar(max)
so the string size is unbounded. suppose I arbitrarily increase the read buffer size. in that case, I can't guarantee it will be larger than "the maximum length of the utf8 encoding of (my) string" because my "current maximum length" is (virtually) infinite.my questions:
would be a shame if I can't use this as the streaming extensions are perfect for my needs!
thanks for taking a look.
The text was updated successfully, but these errors were encountered: