Skip to content

Bigtable BulkApply does not respect custom retry policies for individual mutation errors #14656

Open

Description

@dbolduc

Problem

We use the current retry policy (which can be customized by the application) to determine whether stream failures are transient.

However, we use the default retry policy to determine whether individual mutation errors are transient. Specifically, we only add mutations with default transient errors to the next batch:

// Failed responses are handled according to the current policies.
if (SafeGrpcRetry::IsTransientFailure(status) &&

Implementation notes

  • The annoying this is that the BulkMutatorState code path is shared by a client with Options and one without. So there will not always be a retry policy available. We likely will have to have branching in the common code path, which is a red-flag that it should not be a common code path. 🤷

  • We should only check if the error is transient, with IsPermanentFailure() const. We should not be pinging OnFailure() for individual mutations. (e.g. consider a DataLimitedErrorCountPolicy(...). We want that to apply to stream failures only, not individual mutations).

    bool IsPermanentFailure(Status const& s) const override {
    return impl_.IsPermanentFailure(s);
    }

  • We do not need to check IsExhausted() const. That will be done in the DataConnection's retry loop.

    auto status = mutator.MakeOneRequest(*stub_, *limiter_, *current);

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: bigtableIssues related to the Bigtable API.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Aug 21, 2024
  2. added
    priority: p3Desirable enhancement or fix. May not be included in next release.
    and removed
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: bigtableIssues related to the Bigtable API.priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions