Sitelet https://github.com/googleapis/google-cloud-java/issues/851
Skip to content

BigQueryJob returns false if it does not exists #851

Description

@mderka

On line 183, the job return false if it is null. It makes more sense for it to return true. A job once created cannot be deleted. If a user somehow obtained a non-null Job instance, the only way for this get to receive null is that the job was completed and somehow perished.

/cc @aozarov @mziccard

Activity

  1. aozarov commented on Apr 4, 2016

    @aozarov
    Contributor

    Agree to the above though I would like to mention the other option of throwing an exception if we detect that this job no longer exists.

    I think both of these options are better than getting an infinite loop by waiting for a non-existing job to complete.

  2. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Apr 4, 2016
  3. mziccard commented on Apr 4, 2016

    @mziccard
    Contributor

    Nice catch. FYI job information is no longer available after six months from job creation.
    I think I would return true if you do not have any strong argument against.

    This issue also applies to compute's operations where operations can be deleted only if they have already completed their execution. Even for compute I would return true if the operation does not exist.

  4. added
    api: computeIssues related to the Compute Engine API.
    and removed
    api: bigqueryIssues related to the BigQuery API.
    on Apr 5, 2016
  5. mziccard commented on Apr 5, 2016

    @mziccard
    Contributor

    Leaving this open for compute

  6. mziccard commented on Apr 15, 2016

    @mziccard
    Contributor

    This was fixed in #853 and #914

  7. 7 remaining items

  8. added a commit that references this issue on Oct 5, 2022
  9. added a commit that references this issue on Mar 30, 2026
  10. added a commit that references this issue on Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: computeIssues related to the Compute Engine 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