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

feature: data-expire by partition info #3273

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

lintingbin
Copy link
Contributor

Why are the changes needed?

Close #3272.

Brief change log

  • When the expiration field is the partition field and the expiration level is partition, prioritize using the partition information of the datafile to expire the data files.

  • Modify the expected results of a test case, which is slightly different from the previous implementation. In partition expiration, date comparison is needed, and data files with the same date should not be expired.

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@github-actions github-actions bot added the module:ams-server Ams server module label Oct 17, 2024
Copy link

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 30, 2024
Copy link
Member

@klion26 klion26 left a comment

Choose a reason for hiding this comment

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

@lintingbin Thanks for the contribution, I left some comments, please take a look when you're free thanks.

@github-actions github-actions bot removed the stale label Dec 4, 2024
@Aireed Aireed added this to the Release 0.8.0 milestone Dec 4, 2024
@Aireed Aireed mentioned this pull request Dec 4, 2024
33 tasks
@lintingbin
Copy link
Contributor Author

@klion26 I have already responded and made modifications. Please help review it again.

@klion26
Copy link
Member

klion26 commented Dec 4, 2024

@lintingbin thanks for rebasing the comments, the change LGTM. let's see if there are any more comments from the community.

Do we need to modify the corresponding documents?

@lintingbin
Copy link
Contributor Author

@lintingbin thanks for rebasing the comments, the change LGTM. let's see if there are any more comments from the community.

Do we need to modify the corresponding documents?

There is no need to modify the documentation since there are no changes in the parameters.

@lintingbin
Copy link
Contributor Author

@XBaith I have refactored the code by removing some unnecessary parts and optimizing the naming of variables to enhance readability. I also added a check for cases where transform is Void. Please review the code again.

@XBaith
Copy link
Contributor

XBaith commented Dec 6, 2024

@XBaith I have refactored the code by removing some unnecessary parts and optimizing the naming of variables to enhance readability. I also added a check for cases where transform is Void. Please review the code again.

I don't see any unit test for that case. Do you mean you test locally for Void transform?

Copy link
Contributor

@XBaith XBaith left a comment

Choose a reason for hiding this comment

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

I wrote some unit tests for a case involving expiring partitions after dropping the partition field. Unfortunately, the current procedure cannot handle this scenario correctly.

Here’s the partition level case:

  • I set the partition field as op_time and inserted some records.
  • Then, I removed the partition field before expiring the data.

Expected behavior: All records should be retained since the partition field has been removed.

Please fix this issue and add additional unit tests to cover similar scenarios. Thanks!

@XBaith
Copy link
Contributor

XBaith commented Dec 7, 2024

I wrote some unit tests for a case involving expiring partitions after dropping the partition field. Unfortunately, the current procedure cannot handle this scenario correctly.

Sorry for the mistake; this bug existed prior to this PR. I will raise another PR to address it.

Additionally, we should add more unit tests to cover vulnerabilities as much as possible. Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:ams-server Ams server module
Projects
None yet
6 participants