-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better error handling in backfill script (#2148)
* Fix error handling for backfill - defer the channel close so that the channel is closed no matter what - always report parse and insert errors - handle a cancelled context in the sql query - clean up inappropriate log.Fatal calls leftover from an earlier refactor - don't print success if insertion failed Signed-off-by: Colleen Murphy <[email protected]> * Abort backfill after limited errors If there is a persistent problem with one of the network connections, continuing to attempt the insertion is a waste of time, and if the list of errors gets too long before the script finishes or is interrupted, it becomes impossible to tell when it started failing and therefore where to restart the script from. This change sets a limit on the maximum number of failures to tolerate before exiting the script. Parsing errors are related to the format of the data and don't have implications on the overall success of the script on other data, so no change is implemented for parsing errors. Signed-off-by: Colleen Murphy <[email protected]> --------- Signed-off-by: Colleen Murphy <[email protected]>
- Loading branch information
Showing
1 changed file
with
42 additions
and
22 deletions.
There are no files selected for viewing
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