Skip to content

Commit

Permalink
fix(retention): fix time-based retention (datahub-project#10118)
Browse files Browse the repository at this point in the history
Co-authored-by: Хазиев Ленар <[email protected]>
  • Loading branch information
trialiya and Хазиев Ленар authored Apr 2, 2024
1 parent 5c06f7a commit 57de905
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private void applyTimeBasedRetention(
@Nonnull final Urn urn,
@Nonnull final String aspectName,
@Nonnull final TimeBasedRetention retention) {
Timestamp threshold = new Timestamp(_clock.millis() - retention.getMaxAgeInSeconds() * 1000);
Timestamp threshold = new Timestamp(_clock.millis() - retention.getMaxAgeInSeconds() * 1000L);
SimpleStatement ss =
deleteFrom(CassandraAspect.TABLE_NAME)
.whereColumn(CassandraAspect.URN_COLUMN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private Expression getTimeBasedRetentionQuery(@Nonnull final TimeBasedRetention
return new SimpleExpression(
EbeanAspectV2.CREATED_ON_COLUMN,
Op.LT,
new Timestamp(_clock.millis() - retention.getMaxAgeInSeconds() * 1000));
new Timestamp(_clock.millis() - retention.getMaxAgeInSeconds() * 1000L));
}

private void applyRetention(
Expand Down

0 comments on commit 57de905

Please sign in to comment.