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

Pagination throws an error against Auora Serverless V1 running MySQL 5.7 #49

Open
JeffersonSchuler opened this issue Jul 14, 2022 · 1 comment

Comments

@JeffersonSchuler
Copy link

At the current time this is more of a question if this should work.

Our situation is we have an AWS Auora v1 running as serverless running MySQL 5.7.

We have a large dataset that exceeds being queried in one call. I have seen in the docs for this library that there is some kind of pagination using server side cursors.

Stepping into the code the method "_start_paginated_query" throws an error here: "self._client.execute_statement(**execute_statement_args)" line 196.

{BadRequestException}An error occurred (BadRequestException) when calling the ExecuteStatement operation: Transaction AQ1a0rmK5xPx2DUvqTwbMHbNhwxGqF5Jz7hBXu732zAwepruvVqGRNLm0DkYoXHF0NX79RCmPvRFySf6NXhXMx9wLihYoIIpswCqo11yQiBoK+UBjxtHWzjMatnv/SYhWxHuZwiLKxwU78KIK7LFCwyEnpO1D9qcfntuyC95WC3+RD/sHww8uMGqQKKHbR9siS1c89xZZ2ga is not found: transaction has been aborted due to an error from a previous call

So I was just wondering if this is even supposed to work with this type of server configuration.

Thanks, I really like this library.

@kislyuk
Copy link
Contributor

kislyuk commented Jul 15, 2022

Thanks. Yep, unfortunately this is a known issue. Please see the comment here: cloud-utils/sqlalchemy-aurora-data-api#38 (comment)

I am in a holding pattern with AWS support on this, but chances are I will have to remove the automatic backoff logic altogether since AWS has decided that any active transaction must be aborted on any error - and there is no way to connect multiple statements into a single database connection context without referencing a transaction. You can still use pagination manually with LIMIT..OFFSET or even tap into the internal API of this package (__start_paginated_query()) but the automatic pagination no longer works.

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

No branches or pull requests

2 participants