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

Fixing backfillRelationship for metadata_apsect #486

Merged
merged 3 commits into from
Dec 10, 2024
Merged

Conversation

rakhiagr
Copy link
Contributor

Summary

For the metadata_aspect table, we have seen multiple 0 version records for a certain (urn, aspect and LATEST_VERSION) for a certain entities in one of the GMSes which has createdon as part of the PK. Due to which, backfillRelationship indeterministically considers the first row and not the latest row.

In this PR, this issue is fixed by introducing "ORDER BY" clause on createdon in a descending order and return the first row, which will confirm that we only consider the latest row.

Testing Done

./gradlew build

Checklist

@rakhiagr rakhiagr changed the title Fixing backfillRelationship for old_schema and dual_schema Fixing backfillRelationship for metadata_apsect Dec 10, 2024
Copy link
Contributor

@jsdonn jsdonn left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.28%. Comparing base (ff330d3) to head (f13e132).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #486   +/-   ##
=========================================
  Coverage     66.28%   66.28%           
  Complexity     1537     1537           
=========================================
  Files           137      137           
  Lines          5896     5896           
  Branches        655      655           
=========================================
  Hits           3908     3908           
  Misses         1711     1711           
  Partials        277      277           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rakhiagr rakhiagr merged commit 9adcb21 into master Dec 10, 2024
2 checks passed
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.

3 participants