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

[ARCTIC-1105][AMS] Fix snapshot expire and orphan clean misdelete the DataFiles #1122

Merged
merged 5 commits into from
Feb 22, 2023

Conversation

hzluting
Copy link
Contributor

@hzluting hzluting commented Feb 16, 2023

Why are the changes needed?

fix #1105

Brief change log

  • The snapshot expire check valid DataFiles according to scan from metadata files
  • The orphan file clean check valid DataFiles according to scan from metadata files

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 introduces a new feature? (no)
  • If yes, how is the feature documented? (not documented)

the snapshot expire and the orphan file clean check valid files according to scan from metadata files
@hzluting hzluting requested a review from wangtaohz February 16, 2023 03:05
@github-actions github-actions bot added module:ams-server Ams server module module:ams-dashboard Ams dashboard module labels Feb 16, 2023
@hzluting hzluting requested a review from zhoujinsong February 16, 2023 03:05
luting added 2 commits February 16, 2023 11:07
remove useless code
fix check style
@wangtaohz
Copy link
Contributor

The unit test cases for orphan files clean in TestOrphanFileClean are too simple, and the cases where files are shared by ChangeStore and BaseStore are not covered.

We should add more test cases to ensure it meets our expectations.

fix code review
@hzluting
Copy link
Contributor Author

hzluting commented Feb 16, 2023

OK, I will add some unit test cases.

@hzluting hzluting removed the module:ams-dashboard Ams dashboard module label Feb 16, 2023
@wangtaohz
Copy link
Contributor

LGTM

import org.apache.iceberg.PartitionSpec;
import org.apache.iceberg.Table;
import org.apache.iceberg.data.GenericRecord;
Copy link
Contributor

Choose a reason for hiding this comment

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

seems useless imports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

@github-actions github-actions bot added the module:ams-dashboard Ams dashboard module label Feb 21, 2023
@zhoujinsong zhoujinsong merged commit 802f171 into apache:master Feb 22, 2023
hzluting pushed a commit to hzluting/arctic that referenced this pull request Mar 1, 2023
wangtaohz pushed a commit that referenced this pull request Mar 1, 2023
… DataFiles for 0.3.x (#1173)

cherry-pick #1122

Co-authored-by: luting <dylzlt93299@gmail.com>
zhoujinsong pushed a commit that referenced this pull request May 31, 2023
… DataFiles (#1122)

* #1105
the snapshot expire and the orphan file clean check valid files according to scan from metadata files

* #1105
remove useless code

* #1105
fix check style

* #1105
fix code review

* remove useless import

---------

Co-authored-by: luting <dylzlt93299@gmail.com>
ShawHee pushed a commit to ShawHee/arctic that referenced this pull request Dec 29, 2023
… DataFiles (apache#1122)

* apache#1105
the snapshot expire and the orphan file clean check valid files according to scan from metadata files

* apache#1105
remove useless code

* apache#1105
fix check style

* apache#1105
fix code review

* remove useless import

---------

Co-authored-by: luting <dylzlt93299@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:ams-dashboard Ams dashboard module module:ams-server Ams server module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: The expire snapshot and the orphan file clean scan related files from metadata
3 participants