Skip to content

Fix Redshift performance and memory issues for ingestion-base - #12002

Merged
pmbrull merged 4 commits into
open-metadata:mainfrom
pmbrull:redshift-mprof
Jun 19, 2023
Merged

pmbrull merged 4 commits into
open-metadata:mainfrom
pmbrull:redshift-mprof

Conversation

@pmbrull

@pmbrull pmbrull commented Jun 16, 2023 •

Copy link
Copy Markdown
Member

Describe your changes:

We observed huge memory spikes when running the redshift ingestion, which came together with slow performance, when running the ingestion from the ingestion-base image.

image

  • Changed a few things on the ingestion-base image, specifically to the postgres system libraries.
  • After that, we also needed to fix the version sqlalchemy-redshift==0.8.12. Looks like from 0.8.12 to 0.8.13 something messed things up (we were using 0.8.14). Will look further on this one.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Comment thread ingestion/setup.py
"Jinja2>=2.11.3",
"jsonpatch==1.32",
"jsonschema",
"memory-profiler",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

adding this by default, would help us debug similar scenarios later on with existing builds. It does not add any extra dependency

@cypress

cypress Bot commented Jun 16, 2023

Copy link
Copy Markdown

1 failed tests on run #24141 ↗︎

1 257 54 0 Flakiness 0

Details:

Update redshift deps and ingestion-base image
Project: openmetadata Commit: ab3d92447d
Status: Failed Duration: 24:22 💡
Started: Jun 16, 2023 10:26 AM Ended: Jun 16, 2023 10:51 AM
Failed  cypress/e2e/Flow/AddAndRemoveTierAndOwner.spec.js • 1 failed test • Tests with database postgresql

View Output Video

Test Artifacts
Add and Remove Tier > table details page Output Screenshots Video

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Comment thread ingestion/operators/docker/Dockerfile Outdated
curl https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install msodbcsql18 unixodbc-dev -y
vim \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we need vim to be available here ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I find it's usually a good-to-have, but can be removed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We can remove it for now! If needed for local testing, we can just keep it in Dockerfile.ci !

Comment thread ingestion/setup.py
"redshift": {
"sqlalchemy-redshift~=0.8",
# Going higher has memory and performance issues
"sqlalchemy-redshift==0.8.12",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@pmbrull did we open an issue on the sqlalchemy-redshift repo by any chance?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah on my todo list, let me do it right away

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@pmbrull
pmbrull temporarily deployed to test June 19, 2023 09:28 — with GitHub Actions Inactive
@pmbrull
pmbrull temporarily deployed to test June 19, 2023 09:28 — with GitHub Actions Inactive
@pmbrull
pmbrull temporarily deployed to test June 19, 2023 09:28 — with GitHub Actions Inactive
@pmbrull
pmbrull temporarily deployed to test June 19, 2023 09:28 — with GitHub Actions Inactive
@pmbrull
pmbrull temporarily deployed to test June 19, 2023 09:28 — with GitHub Actions Inactive
@pmbrull
pmbrull temporarily deployed to test June 19, 2023 09:28 — with GitHub Actions Inactive
@sonarqubecloud

Copy link
Copy Markdown

[open-metadata-ingestion] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@pmbrull
pmbrull merged commit 4a8554c into open-metadata:main Jun 19, 2023
pmbrull added a commit that referenced this pull request Jun 19, 2023
* base op

* Update redshift deps and ingestion-base image

* Remove vim

* Remove vim

This branch was previously deployed

1 inactive deployment
test — 2a58d4ca Deployed Jun 19, 2023 by pmbrull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants