Skip to content

Commit

Permalink
Fixed the updateDatasetVersionTtl only updated delete_ts issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
JingQianCloud committed Dec 1, 2023
1 parent c92f5aa commit 0e7631a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public DatasetDao(MySqlDataAccessor dataAccessor, MySqlAccountServiceConfig mySq
DATASET_VERSION_STATE, CREATION_TIME, DELETED_TS);
//this is to update the dataset version to permanent.
updateDatasetVersionTtlSql = String.format(
"update %1$s set %2$s = NULL and %8$s = NULL where %3$s = ? and %4$s = ? and %5$s = ? and %6$s = ? and "
"update %1$s set %2$s = NULL, %8$s = NULL where %3$s = ? and %4$s = ? and %5$s = ? and %6$s = ? and "
+ "(COALESCE(%2$s, %8$s) is NULL or COALESCE(%2$s, %8$s) > now(3)) and %7$s = ?", DATASET_VERSION_TABLE,
DELETE_TS, ACCOUNT_ID, CONTAINER_ID, DATASET_NAME, VERSION, DATASET_VERSION_STATE, DELETED_TS);
//get the dataset version.
Expand Down

0 comments on commit 0e7631a

Please sign in to comment.