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(retention): fix time-based retention #10118

Merged

Conversation

trialiya
Copy link
Contributor

There was a bug when maxAgeInSeconds (Integer) is greater than Integer.MAX_VALUE / 1000 (about 24 days). For example, if maxAgeInSeconds = Integer.MAX_VALUE / 1000 + 1, then maxAgeInSeconds * 1000 = -2147483296, and therefore all previous versions will be deleted.

Another option to fix this is to change the type of maxAgeInSeconds into long:

record TimeBasedRetention {
maxAgeInSeconds: int
}

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). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX community-contribution PR or Issue raised by member(s) of DataHub Community labels Mar 23, 2024
@myuk myuk requested a review from david-leifker March 27, 2024 17:32
Copy link
Collaborator

@david-leifker david-leifker left a comment

Choose a reason for hiding this comment

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

Thx!

@david-leifker david-leifker merged commit 57de905 into datahub-project:master Apr 2, 2024
42 checks passed
@trialiya trialiya deleted the fix-applyTimeBasedRetention branch April 25, 2024 23:29
sleeperdeep pushed a commit to sleeperdeep/datahub that referenced this pull request Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants