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(deletes): Fixing system metadata index deletes #3693

Merged

Conversation

jjoyce0510
Copy link
Collaborator

Summary
Recently we found that deletion of particular entities was failing, particularly when the entity urn had specific characters in it (like _). The root cause it 2 fold: we were creating elastic doc ids using ASCII which is not sufficiently comprehensive to represent an arbitrary byte string. The other is that we were calling delete twice when deleting system metadata. This PR addresses both issues.

Changes

  • Use base64 encoded string as elastic doc id for new system metadata index entries (old ones remain)
  • Change the way we delete aspects from system metadata index to delete by query on the URN, aspect fields instead of by computing a doc id
  • Fix bug where we were deleting multiple times when the key aspect was deleted.
    Validated the changes locally with docker and on k8s deployment.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

@github-actions
Copy link

github-actions bot commented Dec 8, 2021

Unit Test Results

     44 files  ±0       44 suites  ±0   29m 56s ⏱️ + 1m 36s
   619 tests ±0     567 ✔️ ±0  52 💤 ±0  0 ±0 
1 370 runs  ±0  1 302 ✔️ ±0  68 💤 ±0  0 ±0 

Results for commit ea11b38. ± Comparison against base commit 1a5121a.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@dexter-mh-lee dexter-mh-lee left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@shirshanka shirshanka left a comment

Choose a reason for hiding this comment

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

LGTM

@shirshanka shirshanka merged commit 3bac7f7 into datahub-project:master Dec 8, 2021
gabe-lyons pushed a commit to gabe-lyons/datahub that referenced this pull request Dec 9, 2021
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.

None yet

3 participants