-
Notifications
You must be signed in to change notification settings - Fork 383
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
feat(bigtable): per-operation Options (pt. 1) #9623
feat(bigtable): per-operation Options (pt. 1) #9623
Conversation
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Codecov Report
@@ Coverage Diff @@
## main #9623 +/- ##
========================================
Coverage 94.36% 94.36%
========================================
Files 1488 1488
Lines 137863 138017 +154
========================================
+ Hits 130089 130246 +157
+ Misses 7774 7771 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I think there is some authoritative document describing what error code to use when, but I cannot recall its location right now (the gRPC github repo has a copy I think).
google/cloud/bigtable/table.cc
Outdated
return connection_->Apply(table_name_, std::move(mut)); | ||
} | ||
if (!google::cloud::internal::IsEmpty(opts)) { | ||
return Status(StatusCode::kFailedPrecondition, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think kFailedPrecondition
is the right status code. kInvalidArgument
seems more appropriate. kFailedPrecondition
usually refers to a server-side pre-condition that was not met:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you're right. the docs say about kInvalidArgument
: "Note that this differs from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name)."
Fixed.
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to update the status code in the description.
Thanks. At no point did updating the PR description cross my mind. |
Most of the work for #7688
This PR handles all calls except for
Table::(Async)ReadModifyWriteRow(...)
, which are a little bit more involved.If
Options
are supplied to aTable
implemented byDataClient
, we will immediately return akInvalidArgument
error.This change is