Skip to content

Alter() should make retryable errors discernible from other errors #56

@F21

Description

@F21

I have a test suite that uses DropAll to clear out the database and then use Alter to update the schema. The tests are then executed. After each run, we drop the database and update the schema again.

Sometimes, Alter() returns rpc error: code = Unknown desc = Pending transactions found. Please retry operation. The error is retryable, but there doesn't appear to be a way to tell that this is the case when using the client, other than trying to do a string match against the grpc error.

Ideally, there should be a Retryable interface that is implemented by all classes of retryable errors returned by the client. This would enable us to generalize the code required for retrying transactions by type asserting on the interface. See Assert errors for behaviour, not type in this article: https://dave.cheney.net/tag/error-handling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions