Closed
Description
ArangoDB edition: 3.3.10 Enterprise
ArangoDB go-driver master branch commit c2828ac
I have an edge collection with the following options:
keyOptions := &driver.CollectionKeyOptions{
AllowUserKeys: true,
}
options := &driver.CreateCollectionOptions{
ReplicationFactor: 2,
NumberOfShards: 20,
Type: driver.CollectionTypeEdge,
IndexBuckets: 64,
KeyOptions: keyOptions,
}
Then I try with a custom key to add the following document:
LET edge = (
INSERT {
_key: @key,
_from: @fromID,
_to: @toID
} IN @@edgeCollection
RETURN NEW)
RETURN edge
The result is that I have 20 documents added in the collection (equal to the number of shards). If I change the number of shards, the number of the inserted documents still matches the number of shards.
However if I do not use a user provided key the insertion works as expected.
EDIT: I checked the same query through the ArangoDB UI and it seems to work properly, so I presume that this has to do with the driver.
Metadata
Metadata
Assignees
Labels
No labels