GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 'Connection.lookup' can return 'missing' and 'deferred' results · Issue #306 · googleapis/google-cloud-python

'Connection.lookup' can return 'missing' and 'deferred' results #306

New issue
Copy link
New issue
Copy link
Closed
#429
Closed
'Connection.lookup' can return 'missing' and 'deferred' results#306
#429
Copy link
Assignees
tseaver
Labels
🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.

Description

@tseaver
tseaver
opened on Oct 28, 2014
Issue body actions

Do we need to support those fields?

Activity

Next
  1. tseaver
    added
    type: questionRequest for information or clarification. Not an issue.
    api: datastoreIssues related to the Datastore API.
    on Oct 28, 2014
  2. tseaver commented on Oct 28, 2014

    @tseaver
    tseaver
    on Oct 28, 2014
    ContributorAuthor
    More actions

    Options:

    • Have the user pass optional missing and / or deferred lists into lookup(), and populate them IFF they are not None.
    • Change lookup() to always return a three-tuple, (found, missing, deferred), where each item is a list (of entities, key-only entities, and keys, respectively).
  3. dhermes commented on Oct 28, 2014

    @dhermes
    dhermes
    on Oct 28, 2014
    Contributor
    More actions

    I prefer the first option or just a different verb like fetch() versus fetch_page() with ndb.

  4. silvolu commented on Oct 28, 2014

    @silvolu
    silvolu
    on Oct 28, 2014
    Contributor
    More actions

    IRT "do we need to support", they come quite cheap in the end, so it'd be good to have them.
    @pcostell, out of curiosity, how likely is that deferred contains results?
    I don't have any strong opinions about your proposals.

  5. pcostell commented on Oct 28, 2014

    @pcostell
    pcostell
    on Oct 28, 2014
    Contributor
    More actions

    A small percentage of responses have deferred results. The field will only be populated if there were too many keys requested or the result size was too large. I would consider reissuing a lookup to get any deferred keys under the hood so that the user just gets all the results they requested.

  6. silvolu commented on Oct 28, 2014

    @silvolu
    silvolu
    on Oct 28, 2014
    Contributor
    More actions

    I like @pcostell proposal.

  7. dhermes commented on Oct 28, 2014

    @dhermes
    dhermes
    on Oct 28, 2014
    Contributor
    More actions

    I do too, with the caveat that we should let people pass in a boolean to disable the "more RPCs without telling the user" behavior and under that flag we could return the keys that were deferred?

  8. silvolu
    added
    fix-asap
    on Dec 17, 2014
  9. tseaver commented on Dec 17, 2014

    @tseaver
    tseaver
    on Dec 17, 2014
    ContributorAuthor
    More actions

    Can we have the value passed in to disable extra under-the-covers RPCs be a list, into which the contents of the deferred field from the response would be copied? We could handle missing similarly. E.g.:

    deferred = []
    missing = []
    entities = con.lookup(dataset_id, key_pbs, deferred=deferred, missing=missing)
    

    If deferred isn't a list, then we do the "try again" dance as suggested by @pcostell. If missing isn't a list, then we just ignore it (the status quo).

  10. silvolu commented on Dec 17, 2014

    @silvolu
    silvolu
    on Dec 17, 2014
    Contributor
    More actions

    SGTM. @dhermes ?

  11. dhermes commented on Dec 17, 2014

    @dhermes
    dhermes
    on Dec 17, 2014
    Contributor
    More actions

    Yes I like this approach. Simple and convenient.

  12. tseaver
    self-assigned this
    on Dec 17, 2014
  13. tseaver commented on Dec 17, 2014

    @tseaver
    tseaver
    on Dec 17, 2014
    ContributorAuthor
    More actions

    @pcostell wrote:

    I would consider reissuing a lookup to get any deferred keys under the hood so that the user
    just gets all the results they requested.

    Should the code sleep for some interval before retrying the deferred keys?

  14. pcostell commented on Dec 17, 2014

    @pcostell
    pcostell
    on Dec 17, 2014
    Contributor
    More actions

    No need to sleep. There were just too many results in that request.

  15. 36 remaining items

  16. parthea
    added a commit that references this issue on Oct 22, 2023

    chore(deps): update dependency pytest to v7.2.2 (#306)

    8bb9b14
  17. parthea
    added 7 commits that reference this issue on Nov 24, 2025

    chore(python): exclude .github/workflows/unittest.yml in renovate con…

    200a037

    chore: Update multiple dependencies (#306)

    ee69117

    feat: add datastore aggregation query APIs (#306)

    dfc2638

    chore(python): fix typo in README (#306)

    61799f5

    chore(deps): update dependency google-cloud-bigquery to v2.17.0 (#306)

    044b0fa

    chore(deps): update dependency google-cloud-bigquery to v2.17.0 (#306)

    2f8fbaf

    Allow user to pass custom Session object to AuthorizedSession to make…

    8c8e3a4
  18. parthea
    added a commit that references this issue on Feb 9, 2026

    tests: update default Python runtime for tests to 3.14 (#306)

    2184ff4
  19. parthea
    added 2 commits that reference this issue on Mar 2, 2026

    samples: add schema samples (#306)

    1c5a3d6

    chore: copy templates in .github (#306)

    00df0f8
  20. parthea
    added 4 commits that reference this issue on Mar 9, 2026

    feat: implement get_view_names() method (#306)

    3ce15c6

    tests: normailze systest data paths for Windows (#306)

    d265459

    fix: support INSERT from SELECT clause with args (#306)

    e04a363

    fix: pin markdown builder version (#306)

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

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.