Skip to content

Spanner: Adjust timeouts for CreateDatabase and retries for other methods #5544

Closed

Description

@crwilcox

As part of a recent change to GAPIC Configuration, timeouts and retries need to be updated.

Ensure that the timeouts and retires specified in googleapis/googleapis@cc23354#diff-4501db3e3507bcce8496c9aea2017d96 are reflected in this client library.

Activity

  1. added
    api: spannerIssues related to the Spanner API.
    type: processA process-related concern. May include testing, release, or the like.
    and removed
    triage meI really want to be triaged.
    on Jun 24, 2019
  2. olavloite commented on Jun 25, 2019

    @olavloite
    Contributor

    These values are part of the generated gapic client and cannot (or should not) be changed manually. Instead, the gapic client should be re-generated (and I do not have the power to do so).

    @kolea2 Is this something you could initiate?

  3. kolea2 commented on Jun 25, 2019

    @kolea2
    Contributor

    I'll assign to myself and take a look!

  4. assigned and unassigned on Jun 25, 2019
  5. kolea2 commented on Jun 25, 2019

    @kolea2
    Contributor

    @olavloite, #5523 will resolve the retry values (the PR was failing due to testing the default values which I've just fixed). Once merged, we still need to investigate the timeout_millis field, as it looks like that wasn't picked up automatically.

  6. olavloite commented on Jun 26, 2019

    @olavloite
    Contributor

    @olavloite, #5523 will resolve the retry values (the PR was failing due to testing the default values which I've just fixed). Once merged, we still need to investigate the timeout_millis field, as it looks like that wasn't picked up automatically.

    What is the intention of the timeout_millis field? To set the total timeout for the call? Because as far as I can tell, that should be the field total_timeout_millis.

  7. crwilcox commented on Jun 27, 2019

    @crwilcox
    Author

    Java has constants controlling some of this at this time. It needs to use the configurations that are generated.

  8. kolea2 commented on Jul 2, 2019

    @kolea2
    Contributor

    @olavloite looks like .net has the same issue we do: googleapis/google-cloud-dotnet#3165

  9. olavloite commented on Jul 2, 2019

    @olavloite
    Contributor

    @crwilcox @kolea2 The constants are used in two places in the Java library:

    (The latter is not literally using the constant, but I'll change that)

    All other retries use the gapic configuration. I'll change the MIN_BACKOFF_MS value now from 1000 to 250 to conform with the gapic config.

    The question is whether we want to change this from using a constant value to actually using a value from the gapic configuration as discussed here: https://github.com/googleapis/google-cloud-java/issues/5543#issuecomment-505444950
    That way, this value could also dynamically change with the gapic config, but we would need to choose a config item to link it to.

  10. olavloite commented on Jul 2, 2019

    @olavloite
    Contributor

    @crwilcox

    Regarding the high timeout value for CreateDatabase that is not picked up by the regen. I'm not very familiar with the gapic generator and corresponding config, but I noticed the following:

    • There is a retry configuration named default that is assigned to the CreateDatabase call.
    • There are values defined for initial_rpc_timeout_millis and total_timeout_millis in the default retry config, but there is no value defined for timeout_millis in the default config.
    • There is a specific retry configuration for the field timeout_millis for the CreateDatabase call. This field is seemingly not picked up by the generator.

    Are you sure that it isn't one of the fields initial_rpc_timeout_millis or total_timeout_millis that should have been overridden in the configuration for the CreateDatabase call?

  11. yihanzhen commented on Jul 18, 2019

    @yihanzhen
    Contributor

    This field is only used for non-retrying methods, i.e., methods where retry_params_name is not specified. When retry_params_name is given, the method will always retry, and will follow the timeout settings defined here.

    To make this method not retry and respect this field as the total timeout, please remove the retry_params_name field.

    To have this method continue to retry but just change the total timeout, please add a new retry_param_defwith longer timeout, and reference that here.

  12. assigned and unassigned on Jan 2, 2020
  13. skuruppu commented on Jan 2, 2020

    @skuruppu
    Contributor

    I believe we have already adjusted the timeouts in googleapis/spanner_gapic.yaml to what we want these to be. I'll close this issue and re-open if we need to make further adjustments to the timeouts and retries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: spannerIssues related to the Spanner API.type: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions