-
Notifications
You must be signed in to change notification settings - Fork 115
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
bootstrap.sh improvements #10490
Merged
steven-sheehy
merged 7 commits into
hiero-ledger:main
from
nirbosl:bootstrap-script-improvements
Mar 3, 2025
Merged
bootstrap.sh improvements #10490
steven-sheehy
merged 7 commits into
hiero-ledger:main
from
nirbosl:bootstrap-script-improvements
Mar 3, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Nir Ben-Or <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅ |
hedera-mirror-importer/src/main/resources/db/scripts/bootstrap.sh
Outdated
Show resolved
Hide resolved
hedera-mirror-importer/src/main/resources/db/scripts/bootstrap.sh
Outdated
Show resolved
Hide resolved
hedera-mirror-importer/src/main/resources/db/scripts/bootstrap.sh
Outdated
Show resolved
Hide resolved
jnels124
reviewed
Feb 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Nir Ben-Or <[email protected]>
…necessary 'basename' command call Signed-off-by: Nir Ben-Or <[email protected]>
…ue execution; Added a new conditional block to handle a fallback boundary-check if all three full-row-count retries fail Signed-off-by: Nir Ben-Or <[email protected]>
Signed-off-by: Nir Ben-Or <[email protected]>
steven-sheehy
previously approved these changes
Feb 28, 2025
Signed-off-by: Nir Ben-Or <[email protected]>
Signed-off-by: Nir Ben-Or <[email protected]>
steven-sheehy
approved these changes
Mar 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
processing_files
associative array and relying on the pids array for job trackingvalidate_special_files
function with additional validation logicimport_file
function with additional error handling and verification stepsNotes for reviewer:
The changes to the script's code are due to an issue a customer ran into. I was not able to reproduce the issue they ran into (valid file being imported but post-import row-count returns incorrectly then counts again and increments by the amount of rows it counts over and over).
I have focused on potential weaknesses I've identified that could potentially result in such edge-cases, and have refactored and improved their code to be more robust and safer in order to avoid such issues in the future.
I have repeat-tested the script using a dataset that included two large table file parts of each large table, and all small tables in the following two scnearios:
All repeat tests in both scenarios finished successfully.
I have then started a local mirror-importer against the bootstrapped DB and it started cleanly and resumed sync from September 18th timestamps, which is the date this data export was taken on (0.113.2).
Checklist