Skip to content

datastore: unclear exception when query fails due to no index #2555

@tiny-hydra

Description

@tiny-hydra

When applying a specific combination of filters to a query, if an index is not set an unusual exception occurs. Example:

firstname = "foo"
last_checked = datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(hours=1)
query = client.query(kind='people')
query.add_filter('first_name', '=', firstname)
query.add_filter('created_date', '>', last_checked)
results = list(query.fetch())

exception:

<class 'tuple'>: (<class 'grpc._channel._Rendezvous'>, <_Rendezvous of RPC that terminated with (StatusCode.INTERNAL, {"created":"@1476737648.089000000","description":"RST_STREAM","file":"src/core/ext/transport/chttp2/transport/frame_rst_stream.c","file_line":107,"http2_error":2})>, <traceback object at 0x000002325F840FC8>)

Please supply actionable text in the provided response

Metadata

Metadata

Labels

api: datastoreIssues related to the Datastore API.backendpriority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions