YCSB Mongodb _id -


i use ycsb test mongodb.
after load 3000000 documents, try run insert step, encounter problem below:

exception while trying bulk insert 0 com.mongodb.mongowriteexception: insertdocument ::  caused :: 11000 e11000 duplicate key error  index: ycsb.usertable.$_id_  dup key: { : "user451605437247003858" } 

i find when execute load step, _id of each document somehow

"_id" : "user1136",  "_id" : "user1130"  

and on. not meet commonly

"_id" : objectid("55753c547e2596a4d07c2219"), 

so conflict when try insert lot documents easy understand.

so can solve conflict?

i assume key used see below :

"_id" : objectid("55753c547e2596a4d07c2219") 

is generated python driver pymongo.

the mongo module in ycsb uses java driver. when call insert, calling :

com.mongodb.client.mongocollection<tdocument>.insertone 

which throw

com.mongodb.mongowriteexception: e11000 duplicate key error collection    

when insert same key.

i don't think need worry err if want run benchmark. anyway, if don't want see error, change workload, replace insert update.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -