Skip to content

BigQuery job body included in many requests that don't need it #647

Description

@ryanseys

Filed internally at b/21557935, moving to public here:

Ryan, looking at some of our API logs for an unrelated issue, I see gcloud-node is including a giant query string of an entire job configuration for BigQuery API methods that do not require it, such as getQueryResults(). Is there any reason for this? Looking at the gcloud-node code, it seems like simply removing it from all the GET call request options should greatly reduce request size.

I'm guessing the issue starts here.

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: bigqueryIssues related to the BigQuery API.
    on Jun 8, 2015
  2. stephenplusplus commented on Jun 8, 2015

    @stephenplusplus
    Contributor

    Thanks for posting here!

    We will just need to filter what we pass to the API, example: https://github.com/GoogleCloudPlatform/gcloud-node/blob/01ec51f5b37becccdc20130c6389e8201cc1f389/lib/bigquery/index.js#L374

  3. weslem commented on Jun 9, 2015

    @weslem

    Your linked code is exactly what confused me to write the bug. The call to makeReq_() for an existing query passes the entire options as a query string, substantially growing the size of the request. I think you can just null out the query string instead, but I'm concerned I've missed some important context.

  4. stephenplusplus commented on Jun 10, 2015

    @stephenplusplus
    Contributor

    @weslem I sent #652 to fix the issue with getQueryResults. Which other API calls did you find that were passing the object?

  5. weslem commented on Jun 10, 2015

    @weslem

    #652 LGTM; that was the only place I found.

  6. stephenplusplus commented on Jun 10, 2015

    @stephenplusplus
    Contributor

    Awesome, thanks for catching this bug for us! I'm going to create an issue to make sure we plug any leaks that may exist in our other methods.

    Oh, and feel free to report right to us here on the repo next time :)

  7. added a commit that references this issue on Jan 10, 2023
  8. added a commit that references this issue on Jan 24, 2023
  9. 17 remaining items

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

Metadata

Metadata

Labels

api: bigqueryIssues related to the BigQuery API.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