Skip to content

Commit

Permalink
shovel/task: log number of deleted updates during reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandotsmith committed Apr 30, 2024
1 parent 8d3af08 commit 1c96080
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shovel/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,18 @@ func (t *Task) Delete(pg wpg.Conn, n uint64) error {
and ig_name = $2
and num >= $3
`
_, err := pg.Exec(t.ctx, q, t.srcName, t.destConfig.Name, n)
cmd, err := pg.Exec(t.ctx, q, t.srcName, t.destConfig.Name, n)
if err != nil {
return fmt.Errorf("deleting block from task table: %w", err)
}
err = t.dests[0].Delete(t.ctx, pg, n)
if err != nil {
return fmt.Errorf("deleting block: %w", err)
}
slog.InfoContext(t.ctx, "task-delete",
"n", n,
"task_updates", cmd.RowsAffected(),
)
return nil
}

Expand Down

0 comments on commit 1c96080

Please sign in to comment.