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(new schema): read metadata_aspect during getLatest regardless of schema mode #310

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

jsdonn
Copy link
Contributor

@jsdonn jsdonn commented Nov 1, 2023

There is a bug with a recent PR #298 which is causing OptimisticLockException to be thrown. Essentially, getLatest is reading from the new schema (in new schema only mode) but updateWithOptimisticLocking is trying to apply optimistic locking on the old schema table using the timestamp returned from the getLatest call on the entity table. The timestamps in the old and new schema tables may be off by a few ms so the update will fail during timestamp comparation.

This PR aims to revert part of that PR by reading the old schema table during getLatest always UNLESS change log is disabled.

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)

Copy link
Contributor

@yangyangv2 yangyangv2 left a comment

Choose a reason for hiding this comment

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

LGTM

@jsdonn jsdonn merged commit e0e891d into linkedin:master Nov 1, 2023
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.

2 participants