Skip to content
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

Fixed exception in DBVisualizer for LIMIT 1 queries. #73

Merged
merged 5 commits into from
Nov 26, 2021

Conversation

lyndonbauto
Copy link
Contributor

Summary

Fixed exception in DBVisualizer for LIMIT 1 queries.

Description

Limit 1 was giving intermittent exceptions in DBVisualizer. I investigated this for a while and found the root cause. Due to some timing with LIMIT 1, the interrupt (intended to unblock our BlockingQueue) was interrupting the ResultSet retrieval thread of DBVisualizer.

DBVisualizer was then reporting an error, even though all the results were properly retrieved.

To fix this I did changed the BlockingQueue unblock mechanism to use a specified extension of the List interface I made, which denotes that there are no more results. This removes the need for try/catch logic, synchronized blocks, over overall reduces complexity of pagination.

LIMIT 1 no longer errors in DBVisualizer, and I added some extra tests for it in our test class.

Related Issue

closes #69

Additional Reviewers

@birschick-bq
@lyndonb-bq
@xiazcy
@simonz-bq
@alexey-temnikov
@kylepbit

@lyndonbauto lyndonbauto added this to the Neptune JDBC Driver GA milestone Nov 24, 2021
@lyndonbauto lyndonbauto requested a review from a team November 24, 2021 23:50
@lyndonbauto lyndonbauto self-assigned this Nov 24, 2021
@lyndonbauto lyndonbauto merged commit 6b62826 into develop Nov 26, 2021
@lyndonbauto lyndonbauto deleted the lyndon/AN-878-limit-1-error branch November 26, 2021 23:06
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.

[BUG] LIMIT 1 DBVisualizer Exception
2 participants