-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emulator doesn't differentiate between MORE_RESULTS_AFTER_LIMIT and NO_MORE_RESULTS #130
Comments
@pcostell is this still an issue? We had another question about this pop up in googleapis/google-cloud-node#2846 |
I've just found this issue by running my .NET integration tests against the emulator. So yes, it looks like it's still an issue. |
Currently one test fails against the emulator, due to googleapis/google-cloud-datastore#130
Currently one test fails against the emulator, due to googleapis/google-cloud-datastore#130
Currently one test fails against the emulator, due to googleapis/google-cloud-datastore#130
Currently one test fails against the emulator, due to googleapis/google-cloud-datastore#130
Currently one test fails against the emulator, due to googleapis/google-cloud-datastore#130
Improve usage of Datastore Emulator by not requiring credentials to be set. Rewrite failing system test to work around emulator discrepency with ``more_results`` field of ``QueryResultsBatch`` message. See: googleapis/google-cloud-datastore#130 Update the ``more`` return value of ``Query.fetch_page`` to be ``False`` if an empty page has just been retrieved. This is intended to prevent possible infinite loops in client code when using the Datastore emulator.
Improve usage of Datastore Emulator by not requiring credentials to be set. Rewrite failing system test to work around emulator discrepency with ``more_results`` field of ``QueryResultsBatch`` message. See: googleapis/google-cloud-datastore#130 Update the ``more`` return value of ``Query.fetch_page`` to be ``False`` if an empty page has just been retrieved. This is intended to prevent possible infinite loops in client code when using the Datastore emulator.
This is a workaround for a bug in the datastore-emulator, see googleapis/google-cloud-datastore#130 googleapis/google-cloud-node#2846
This is a workaround for a bug in the datastore-emulator, see googleapis/google-cloud-datastore#130 googleapis/google-cloud-node#2846
@pcostell It seems like this issue persists; can we route this internally to the emulator team? |
I created internal issue b/259553638 and have routed it to the Datastore Emulator team. Thanks! |
This is a result of the emulator being built
on the Cloud Datastore API for App Engine, which only distinguishes between
NOT_FINISHED or not. Since the
more_results
flag is a hint (see below),the only safe response when the query is finished is
MORE_RESULTS_AFTER_LIMIT.
Something to note:
more_results
is a best effort hint to the developer. In the case of theemulator it is buggy that
MORE_RESULTS_AFTER_LIMIT
is returned even ifthe query didn't reach the limit. However even in production, the query may
return
MORE_RESULTS_AFTER_LIMIT
even if there are no more results if theserver is unwilling to do the work to check for the next entity.
This is not the issue here but for posterity: in order to determine if you
should keep iterating through results the clients should only ever use
more_results == NOT_FINISHED a
a loop condition.The text was updated successfully, but these errors were encountered: