Skip to content

Conversation

@Emill
Copy link
Contributor

@Emill Emill commented Apr 11, 2021

Fixes #3648.

@Emill Emill force-pushed the recover-buffer-pos branch from 54ca855 to fc85fe6 Compare April 11, 2021 13:31
Comment on lines 1520 to 1527
{
if (Connector.State != ConnectorState.Broken)
{
var writtenBytes = Buffer.ReadPosition - position;
var remainingBytes = ColumnLen - writtenBytes;
var readBytes = Buffer.ReadPosition - position;
var remainingBytes = ColumnLen - readBytes;
if (remainingBytes > 0)
Buffer.Skip(remainingBytes, false).GetAwaiter().GetResult();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to catch and handle exception thrown inside type handlers for the non-sequential case, and make sure skip to end? Can't we leave it at any ReadPosition? When the next column or row is read, a new seek to column (or seek to row end if we move to the next row) is done anyway.

@NinoFloris NinoFloris mentioned this pull request Aug 15, 2023
8 tasks
@NinoFloris NinoFloris added this to the 8.0.0 milestone Sep 25, 2023
@Brar Brar removed this from the 8.0.0 milestone Nov 21, 2023
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

Successfully merging this pull request may close these issues.

Recover the buffer position when type handler throws, for sequential read

3 participants