dart-lang/labs

Datastore crashed with assertion

liyuqian opened this issue · 3 comments

The assertion assert(isLast != moreBatches); in https://github.com/dart-lang/gcloud/blob/master/lib/src/datastore_impl.dart#L555 failed because moreResults == 'NOT_FINISHED' instead of 'MORE_RESULTS_AFTER_LIMIT'.

See MoreResultsType in https://cloud.google.com/datastore/docs/reference/data/rpc/google.datastore.v1

The implementation you are referring to is based on a json-based public REST api. This was only a stop-gap for non-AppEngine use cases until we had a much more performant gRPC-based implementation which works everywhere (which is why IIRC it is only under lib/src).

The gRPC based implementation has been available for a long time, though inside package:appengine, see lib/src/grpc_api_impl/datastore_impl.dart.

For many years now I haven't worked on those packages, @jonasfj is now the primary drive behind those packages.