Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dbolduc opened this issue Aug 21, 2024 · 0 comments
Labels
api: bigtable Issues related to the Bigtable API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@dbolduc
Copy link
Member

dbolduc commented Aug 21, 2024

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);

@dbolduc dbolduc added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: bigtable Issues related to the Bigtable API. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Aug 21, 2024
@dbolduc dbolduc added priority: p3 Desirable enhancement or fix. May not be included in next release. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant