Skip to content

Exit 0 if all input iceberg restarts are empty #359

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ceblanton
Copy link
Contributor

@ceblanton ceblanton commented May 2, 2025

Description
Checks to see if all input files are empty. If so, print a message to the user stating all is fine, and exit 0.

Fixes #358

How Has This Been Tested?
I tested it on empty input files and non-empty files.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

@ceblanton ceblanton changed the title #358 Exit 0 if all input iceberg restarts are empty Exit 0 if all input iceberg restarts are empty May 2, 2025
@ceblanton ceblanton requested a review from underwoo May 2, 2025 15:18
@@ -321,6 +321,14 @@ then
exit $EXIT_FAILURE
fi

# If all the iceberg files are empty, then there is no work to do.
# Report this to the user and exit 0.
if [ -z "$combine_files" ]
Copy link
Member

Choose a reason for hiding this comment

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

This will always be true as $combine_files hasn't yet been defined.

Please describe why you want this option here? If the number of files passed to this is zero, then it should be a failure.

Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps line 318 can be changed to if [ -s $out_file ]? that checks if the file exists and its size is > 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iceberg_comb.sh fails when all iceberg files are empty
3 participants