Skip to content

feat(driverbase): try to protect against incorrect reader usage#117

Merged
lidavidm merged 1 commit intomainfrom
dev
Feb 5, 2026
Merged

feat(driverbase): try to protect against incorrect reader usage#117
lidavidm merged 1 commit intomainfrom
dev

Conversation

@lidavidm
Copy link
Copy Markdown
Contributor

What's Changed

See adbc-drivers/mssql#5

It's not clear how the reader got into a state where AppendRow was being called after the array.RecordBuilder got released, but perhaps there was concurrent usage somewhere. Try to protect against concurrent usage.

@lidavidm lidavidm requested review from amoeba and zeroshade January 28, 2026 07:17
@lidavidm lidavidm marked this pull request as ready for review January 28, 2026 07:19
Copy link
Copy Markdown

@amoeba amoeba left a comment

Choose a reason for hiding this comment

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

+1

Do we need to update

func (c closer) Close() error {
for this too?

@lidavidm
Copy link
Copy Markdown
Contributor Author

lidavidm commented Feb 4, 2026

I was worried about causing deadlock due to attempting to take the mutex recursively er wait that's a completely different file. Let me look.

See adbc-drivers/mssql#5

It's not clear how the reader got into a state where AppendRow
was being called after the array.RecordBuilder got released, but
perhaps there was concurrent usage somewhere.  Try to protect
against concurrent usage.
@lidavidm
Copy link
Copy Markdown
Contributor Author

lidavidm commented Feb 4, 2026

Ok, I refactored Close into Close and closeUnlocked.

@lidavidm lidavidm requested a review from amoeba February 4, 2026 06:44
Copy link
Copy Markdown

@amoeba amoeba left a comment

Choose a reason for hiding this comment

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

Looks good.

@lidavidm lidavidm merged commit 96f1f14 into main Feb 5, 2026
5 checks passed
@lidavidm lidavidm deleted the dev branch February 5, 2026 00:37
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.

2 participants