Client
Datastore
Environment
Any...
Go Environment
$ go version
go version go1.20.3 darwin/arm64
$ go env
Code
|
ks := k.String() |
|
if _, ok := keyMap[ks]; !ok { |
|
pbKeys = append(pbKeys, keyToProto(k)) |
|
} |
|
keyMap[ks] = append(keyMap[ks], i) |
Let's say I have...
- Entity 1:
Kind: A, Name: B, Namespace: NS1
- Entity 2:
Kind: A, Name: B, Namespace: NS2
...then the second one will be deduped in the code above since namespace is not taken into consideration. Meaning that pbKeys is not complete.
Expected behavior
Both keys should be added to pbKeys.
Actual behavior


As one can see above. Index 1 and 2 in keys are just index 1 in pbKeys due to the fact that they share the same string representation.
Additional context
N/A
Client
Datastore
Environment
Any...
Go Environment
$ go version
go version go1.20.3 darwin/arm64$ go env
Code
google-cloud-go/datastore/datastore.go
Lines 459 to 463 in e41aae2
Let's say I have...
Kind: A, Name: B, Namespace: NS1Kind: A, Name: B, Namespace: NS2...then the second one will be deduped in the code above since namespace is not taken into consideration. Meaning that
pbKeysis not complete.Expected behavior
Both keys should be added to
pbKeys.Actual behavior
As one can see above. Index 1 and 2 in
keysare just index 1 inpbKeysdue to the fact that they share the same string representation.Additional context
N/A