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: More robust __exit__ on DataValidation() #1206

Merged
merged 6 commits into from
Jul 29, 2024

Conversation

nj1973
Copy link
Contributor

@nj1973 nj1973 commented Jul 25, 2024

No description provided.

@nj1973 nj1973 requested a review from a team as a code owner July 25, 2024 09:44
@nj1973 nj1973 linked an issue Jul 25, 2024 that may be closed by this pull request
@nj1973 nj1973 requested a review from helensilva14 July 25, 2024 09:50
self.config_manager.source_client.con.dispose()
self.config_manager.target_client.con.dispose()
if hasattr(self.config_manager.source_client, "con"):
self.config_manager.source_client.con.dispose()
Copy link
Collaborator

Choose a reason for hiding this comment

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

We might want to check if dispose() is a supported method too. I know in Teradata I get the following now: PM-WARNING: Exception closing connections: 'TeradataCursor' object has no attribute 'dispose'

Copy link
Contributor

Choose a reason for hiding this comment

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

@nj1973 - this might be a problem specific to Postgres. I did not see this issue on Oracle.

Please take a look at my PR regarding too many files in a config directory. There by changing the way we did validation, I was able to process about 150 files in sequence. I was impressed that the python oracle driver and/or the garbage collection were working well.

Sundar Mudupalli

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In my testing I could see the connection count climbing in both Oracle and PostgreSQL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We might want to check if dispose() is a supported method too. I know in Teradata I get the following now: PM-WARNING: Exception closing connections: 'TeradataCursor' object has no attribute 'dispose'

Hmm, I think I should wrap the dispose() calls in a check for Oracle and PostgreSQL. They are the systems with a known problem. I made the assumption that there would be consistency across other engine's interfaces but that was clearly a bad assumption.

@nj1973
Copy link
Contributor Author

nj1973 commented Jul 26, 2024

/gcbrun

@nj1973 nj1973 merged commit 13ec3ee into develop Jul 29, 2024
3 of 4 checks passed
@nj1973 nj1973 deleted the 1195-connections-close-warning branch July 29, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi table validations exhausted PostgreSQL connections
3 participants