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

fix: should wait for ringbuffer thread to finish before closing statement #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

filipelautert
Copy link

@filipelautert filipelautert commented Jan 10, 2025

Description

If we do not wait for it, a subsequent call may have issues of ERROR: current transaction is aborted, commands ignored until end of transaction block.

This check existed until 2.1.0.21, was replaced by method resumeReadAndDiscardResults() in 2.1.0.22 (this method already presented issues), and some versions later the replacement was removed in filipelautert@befa7de - so no checks for ringbuffer are done anymore when closing the connection.

Motivation and Context

Liquibase Redshift extension only works with driver versions until 2.1.0.21 . After that version it fails with the presented error message.

As a workaround, we can use ?enablefetchringbuffer=false

Testing

Run any Liquibase version (most recent is 4.30.0) using redshift integration ( https://github.com/liquibase/liquibase-redshift ):

  • using driver version until 2.1.0.21, it works
  • above that it fails

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • [] My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG

License

  • By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

… issues of 'ERROR: current transaction is aborted, commands ignored until end of transaction block'

This check existed until 2.1.0.21, was replaced by a more complex method in 2.1.0.22 (that already presented issues), and some versions later the replacement was removed.
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.

1 participant