-
Notifications
You must be signed in to change notification settings - Fork 653
Closed
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Moved from here: #1205 (comment), originally reported by @sfbaltaci
Steps to reproduce
var gcd = require('google-cloud').datastore(/* auth here if necessary */)
var keys = []
// var numKeysToCreate = 300 // works
var numKeysToCreate = 350 // fails
while (numKeysToCreate--) {
keys.push(gcd.key(['Kind', numKeysToCreate + 1]))
}
gcd.get(keys, console.log)prints an error:
/Users/stephen/dev/play/gissue-1205/node_modules/protobufjs/dist/ProtoBuf.js:2440
throw Error(this+"#"+keyOrObj+" is not a field: undefined");
^
Error: .google.datastore.v1beta3.Key#id is not a field: undefined
at Error (native)
at MessagePrototype.set (/Users/stephen/dev/play/gissue-1205/node_modules/protobufjs/dist/ProtoBuf.js:2440:35)
at MessagePrototype.set (/Users/stephen/dev/play/gissue-1205/node_modules/protobufjs/dist/ProtoBuf.js:2434:38)
at Message (/Users/stephen/dev/play/gissue-1205/node_modules/protobufjs/dist/ProtoBuf.js:2363:34)
at ProtoBuf.Reflect.ElementPrototype.verifyValue (/Users/stephen/dev/play/gissue-1205/node_modules/protobufjs/dist/ProtoBuf.js:1877:28)
at ProtoBuf.Reflect.FieldPrototype.verifyValue (/Users/stephen/dev/play/gissue-1205/node_modules/protobufjs/dist/ProtoBuf.js:3417:43)
at MessagePrototype.set (/Users/stephen/dev/play/gissue-1205/node_modules/protobufjs/dist/ProtoBuf.js:2443:59)
at MessagePrototype.set (/Users/stephen/dev/play/gissue-1205/node_modules/protobufjs/dist/ProtoBuf.js:2434:38)
at Message (/Users/stephen/dev/play/gissue-1205/node_modules/protobufjs/dist/ProtoBuf.js:2363:34)
at serialize (/Users/stephen/dev/play/gissue-1205/node_modules/grpc/src/node/src/common.js:87:23)
@pcostell any thoughts on what might be the trouble here? Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.