Skip to content

Commit

Permalink
fix incrementing of bigtable_backup_job_backups_created metric (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepsukhani authored and gouthamve committed Aug 22, 2019
1 parent 4c41843 commit 481906c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/bigtable-backup/bigtable-backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 481906c

Please sign in to comment.