Skip to content

Commit

Permalink
workload/schemachange: enhance logging during operation generation
Browse files Browse the repository at this point in the history
Currently, when generating an operation in the schema changer workload,
we don't have enough information to diagnose failed screening queries.
This patch wraps errors during query generation to track which operator
we were currently working on.

Release note: None
  • Loading branch information
fqazi committed Oct 8, 2024
1 parent 26d67df commit 74008d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/workload/schemachange/operation_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (og *operationGenerator) randOp(
if errors.Is(err, ErrSchemaChangesDisallowedDueToPkSwap) {
continue
}
return nil, err
return nil, errors.Wrapf(err, "failed generating operation: %s", op)
}

// Screen for schema change after write in the same transaction.
Expand Down

0 comments on commit 74008d0

Please sign in to comment.