Skip to content

[Enhancement] (image) check image validity as soon as generated - #9011

Merged
lide-reed merged 6 commits into
apache:masterfrom
Henry2SS:whz-image-clean-protect
Apr 25, 2022
Merged

[Enhancement] (image) check image validity as soon as generated#9011
lide-reed merged 6 commits into
apache:masterfrom
Henry2SS:whz-image-clean-protect

Conversation

@Henry2SS

Copy link
Copy Markdown
Contributor

load newly generated image file as soon as generated to check if it is valid.

Proposed changes

Issue Number: close#9010

Problem Summary:

Describe the overview of changes.

Checklist(Required)

  1. Does it affect the original behavior: (Yes)
  2. Has unit tests been added: (No Need)
  3. Has document been added or modified: (No Need)
  4. Does it need to update dependencies: (No)
  5. Are there any changes that cannot be rolled back: (No)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

morningman
morningman previously approved these changes Apr 13, 2022

@morningmanmorningman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@morningmanmorningman added the area/catalog Issues or PRs related to catalog management label Apr 13, 2022
@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Apr 13, 2022
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@github-actionsgithub-actionsBot removed the approved Indicates a PR has been approved by one committer. label Apr 13, 2022

@lide-reedlide-reed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

if (latestInvalidImage.delete()) {
LOG.info(latestInvalidImage.getAbsoluteFile() + " deleted.");
} else {
LOG.warn(latestInvalidImage.getAbsoluteFile() + " delete failed.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can it print the reason to the warning log if delete failed

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Apr 25, 2022
@lide-reed
lide-reed merged commit bdf915a into apache:masterApr 25, 2022
weizhengte pushed a commit to weizhengte/incubator-doris that referenced this pull request Apr 25, 2022
…he#9011)
* load newly generated image file as soon as generated to check if it is valid.
* delete the latest invalid image file
* fix
* fix
* get filePath from saveImage() to ensure deleting the correct file while exception happens
* fix
Co-authored-by: wuhangze <wuhangze@jd.com>
(cherry picked from commit bdf915a)
weizhengte pushed a commit to weizhengte/incubator-doris that referenced this pull request Apr 26, 2022
…he#9011)
* load newly generated image file as soon as generated to check if it is valid.
* delete the latest invalid image file
* fix
* fix
* get filePath from saveImage() to ensure deleting the correct file while exception happens
* fix
Co-authored-by: wuhangze <wuhangze@jd.com>
(cherry picked from commit bdf915a)
@caiconghuicaiconghui added the dev/1.0.1-deprecated should be merged into dev-1.0.1 branch label Apr 26, 2022
@morningmanmorningman added dev/merged-1.0.1-deprecated PR has been merged into dev-1.0.1 and removed dev/1.0.1-deprecated should be merged into dev-1.0.1 branch labels Apr 26, 2022
morningman pushed a commit that referenced this pull request Apr 26, 2022
* load newly generated image file as soon as generated to check if it is valid.
* delete the latest invalid image file
* fix
* fix
* get filePath from saveImage() to ensure deleting the correct file while exception happens
* fix
Co-authored-by: wuhangze <wuhangze@jd.com>
@morningmanmorningman mentioned this pull request Apr 27, 2022
3 tasks
morningman pushed a commit to morningman/doris that referenced this pull request Apr 27, 2022
morningman added a commit that referenced this pull request Apr 28, 2022
morningman added a commit that referenced this pull request Apr 28, 2022
zhengshiJ pushed a commit to zhengshiJ/incubator-doris that referenced this pull request Apr 29, 2022
Kikyou1997 pushed a commit to Kikyou1997/incubator-doris that referenced this pull request May 9, 2022
…he#9011)
* load newly generated image file as soon as generated to check if it is valid.
* delete the latest invalid image file
* fix
* fix
* get filePath from saveImage() to ensure deleting the correct file while exception happens
* fix
Co-authored-by: wuhangze <wuhangze@jd.com>
Kikyou1997 pushed a commit to Kikyou1997/incubator-doris that referenced this pull request May 9, 2022
starocean999 pushed a commit to starocean999/incubator-doris that referenced this pull request May 19, 2022
…he#9011)
* load newly generated image file as soon as generated to check if it is valid.
* delete the latest invalid image file
* fix
* fix
* get filePath from saveImage() to ensure deleting the correct file while exception happens
* fix
Co-authored-by: wuhangze <wuhangze@jd.com>
starocean999 pushed a commit to starocean999/incubator-doris that referenced this pull request May 19, 2022
englefly pushed a commit to englefly/incubator-doris that referenced this pull request May 23, 2022
…he#9011)
* load newly generated image file as soon as generated to check if it is valid.
* delete the latest invalid image file
* fix
* fix
* get filePath from saveImage() to ensure deleting the correct file while exception happens
* fix
Co-authored-by: wuhangze <wuhangze@jd.com>
englefly pushed a commit to englefly/incubator-doris that referenced this pull request May 23, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.area/catalogIssues or PRs related to catalog managementdev/merged-1.0.1-deprecatedPR has been merged into dev-1.0.1kind/improvementreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] check newly generated image validity as soon as generated

4 participants

@Henry2SS@lide-reed@morningman@caiconghui