From e7e809998995fa23bf82fcd61f2b4cfe8cd68ed2 Mon Sep 17 00:00:00 2001 From: Sandeep Sukhani Date: Wed, 21 Aug 2019 18:44:21 +0530 Subject: [PATCH] fix incrementing of bigtable_backup_job_backups_created metric --- tools/bigtable-backup/bigtable-backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bigtable-backup/bigtable-backup.py b/tools/bigtable-backup/bigtable-backup.py index 7e74c363b37a..a45be0c4b46a 100644 --- a/tools/bigtable-backup/bigtable-backup.py +++ b/tools/bigtable-backup/bigtable-backup.py @@ -58,7 +58,6 @@ def ensure_backups(args): if table_id not in backups: print("backup for {} not found".format(table_id)) create_backup(table_id, args) - bigtable_backup_job_backups_created.inc(1) if table_id == active_table_number: bigtable_backup_job_last_active_table_backup_time_seconds.set_to_current_time() @@ -168,6 +167,7 @@ def create_backup(table_id, args): raise Exception("Failed to create backup with error {}".format(b"".join(popen.stdout.readlines()).decode())) else: print("Backup created for table {}".format(table_id)) + bigtable_backup_job_backups_created.inc(1) def delete_backup(table_id, timestamp, args): popen = subprocess.Popen(['bigtable-backup', 'delete-backup', '--bigtable-table-id', table_id,