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(Spanner): support max_commit_delay for commit_options #85
Conversation
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.
Suggested some minor improvements. But otherwise LGTM.
google-cloud-spanner/test/google/cloud/spanner/convert/number_to_duration_test.rb
Outdated
Show resolved
Hide resolved
google-cloud-spanner/test/google/cloud/spanner/client/commit_test.rb
Outdated
Show resolved
Hide resolved
@@ -1141,6 +1145,10 @@ def upsert table, rows, commit_options: nil, request_options: nil | |||
# * `:return_commit_stats` (Boolean) A boolean value. If `true`, | |||
# then statistics related to the transaction will be included in | |||
# {CommitResponse}. Default value is `false` | |||
# * `:maxCommitDelay` (Numeric) The amount of latency in millisecond in this request | |||
# is willing to incur in order to improve throughput. | |||
# The commit delay must be at least 0ms and at most 500ms |
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.
For my understanding, what happens if the user value is out of this range? Will it be ignored? Or will the backend throw some kind of exception?
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.
An error is thrown from backend telling the value is out of range.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
bundle exec rake ci
in the gem subdirectory.closes: #<issue_number_goes_here>