Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

NON-JIRA: Make backups when table has backup made after source table … #160

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

radkomateusz
Copy link
Contributor

…last modification but there is size mismatch between source and backup table.

Empty source table corner case still should no be backed up if non empty backup exists.

…last modification but there is size mismatch between source and backup table.

Empty source table corner case still should no be backed up if non empty backup exists.
@coveralls
Copy link

coveralls commented Dec 2, 2019

Pull Request Test Coverage Report for Build 1258

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 84.684%

Totals Coverage Status
Change from base Build 1256: 0.02%
Covered Lines: 2466
Relevant Lines: 2912

💛 - Coveralls


source_table_num_bytes = big_query_table_metadata.table_size_in_bytes()
if source_table_num_bytes != last_backup.numBytes:
logging.info("Backup size is different than source. "
Copy link
Contributor

Choose a reason for hiding this comment

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

As in theory this should never happen, maybe we should log also source/backup last update time, so it will be easier to analyse based on logs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's already logged at the begining of __is_table_backup_up_to_date method.
So informations are already in place.

@marcin-kolda marcin-kolda merged commit cd859e7 into master Dec 10, 2019
@marcin-kolda marcin-kolda deleted the NON_JIRA_do_backup_when_size_mismatch branch December 10, 2019 15:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants