Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDB IllegalArgumentException: Invalid BSON field name _id - Mongo synchronous driver #277

Closed
betotorres opened this issue Jun 5, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@betotorres
Copy link

commented Jun 5, 2015

I followed all the instructions to install YCSB. I did the tests in mysql successfully, however When I try to use the synchronous Mongodb driver I get an error.

The error happens only with the synchronous driver, since I can execute successfully the commands "./bin/ycsb load mongodb-async -s -P workloads/workloads" and "./ben/ycsb run mongodb-async -s -P workloads/workloada".

The error that happen when I try to execute "./bin/ycsb load mongodb -s -P workloads/workloada" is the following:

Loading workload...
Starting test.
2015-06-04 20:35:59:911 0 sec: 0 operations;
java.lang.IllegalArgumentException: Invalid BSON field name _id
at org.bson.AbstractBsonWriter.writeName(AbstractBsonWriter.java:494)
at org.bson.codecs.DocumentCodec.writeMap(DocumentCodec.java:188)
at org.bson.codecs.DocumentCodec.encode(DocumentCodec.java:131)
at org.bson.codecs.DocumentCodec.encode(DocumentCodec.java:45)
at org.bson.codecs.BsonDocumentWrapperCodec.encode(BsonDocumentWrapperCodec.java:63)
at org.bson.codecs.BsonDocumentWrapperCodec.encode(BsonDocumentWrapperCodec.java:29)
at com.mongodb.connection.UpdateCommandMessage.writeTheWrites(UpdateCommandMessage.java:85)
at com.mongodb.connection.UpdateCommandMessage.writeTheWrites(UpdateCommandMessage.java:42)
at com.mongodb.connection.BaseWriteCommandMessage.encodeMessageBody(BaseWriteCommandMessage.java:112)
at com.mongodb.connection.BaseWriteCommandMessage.encodeMessageBody(BaseWriteCommandMessage.java:35)
at com.mongodb.connection.RequestMessage.encode(RequestMessage.java:132)
at com.mongodb.connection.BaseWriteCommandMessage.encode(BaseWriteCommandMessage.java:89)
at com.mongodb.connection.WriteCommandProtocol.sendMessage(WriteCommandProtocol.java:170)
at com.mongodb.connection.WriteCommandProtocol.execute(WriteCommandProtocol.java:73)
at com.mongodb.connection.UpdateCommandProtocol.execute(UpdateCommandProtocol.java:63)
at com.mongodb.connection.UpdateCommandProtocol.execute(UpdateCommandProtocol.java:37)
at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:155)
at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:219)
at com.mongodb.connection.DefaultServerConnection.updateCommand(DefaultServerConnection.java:120)
at com.mongodb.operation.MixedBulkWriteOperation$Run$3.executeWriteCommandProtocol(MixedBulkWriteOperation.java:440)
at com.mongodb.operation.MixedBulkWriteOperation$Run$RunExecutor.execute(MixedBulkWriteOperation.java:604)
at com.mongodb.operation.MixedBulkWriteOperation$Run.execute(MixedBulkWriteOperation.java:361)
at com.mongodb.operation.MixedBulkWriteOperation$1.call(MixedBulkWriteOperation.java:148)
at com.mongodb.operation.MixedBulkWriteOperation$1.call(MixedBulkWriteOperation.java:141)
at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:186)
at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:177)
at com.mongodb.operation.MixedBulkWriteOperation.execute(MixedBulkWriteOperation.java:141)
at com.mongodb.operation.MixedBulkWriteOperation.execute(MixedBulkWriteOperation.java:72)
at com.mongodb.Mongo.execute(Mongo.java:745)
at com.mongodb.Mongo$2.execute(Mongo.java:728)
at com.mongodb.MongoCollectionImpl.executeSingleWriteRequest(MongoCollectionImpl.java:482)
at com.mongodb.MongoCollectionImpl.update(MongoCollectionImpl.java:474)
at com.mongodb.MongoCollectionImpl.updateOne(MongoCollectionImpl.java:325)
at com.yahoo.ycsb.db.MongoDbClient.insert(MongoDbClient.java:253)
at com.yahoo.ycsb.DBWrapper.insert(DBWrapper.java:148)
at com.yahoo.ycsb.workloads.CoreWorkload.doInsert(CoreWorkload.java:543)
at com.yahoo.ycsb.ClientThread.run(Client.java:277)
2015-06-04 20:36:00:843 1 sec: 0 operations; [INSERT AverageLatency(us)=93170] [CLEANUP AverageLatency(us)=1996]

@busbey

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2015

ping @allanbank

@allanbank

This comment has been minimized.

Copy link
Collaborator

commented Jun 6, 2015

@busbey - Thanks for the ping. I think I see the problem. I will submit a pull request once I verify.

allanbank added a commit to allanbank/YCSB that referenced this issue Jun 6, 2015

Fix brianfrankcooper#277 - Switch from updateOne to replaceOne to mat…
…ch changed semantics in the

MongoDB 3.0 driver.

Created tests for the basic DB operations.

Updated MongoDB Inc. Driver version to 3.0.2.

allanbank added a commit to allanbank/YCSB that referenced this issue Jun 6, 2015

@busbey busbey closed this in #280 Jun 6, 2015

busbey added a commit that referenced this issue Jun 6, 2015

Merge pull request #280 from allanbank/ycsb_277
[mongodb] Fix #277 - Switch from updateOne to replaceOne.

jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016

Fix brianfrankcooper#277 - Switch from updateOne to replaceOne to mat…
…ch changed semantics in the

MongoDB 3.0 driver.

Created tests for the basic DB operations.

Updated MongoDB Inc. Driver version to 3.0.2.

jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016

jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016

Merge pull request brianfrankcooper#280 from allanbank/ycsb_277
[mongodb] Fix brianfrankcooper#277 - Switch from updateOne to replaceOne.

jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016

Fix brianfrankcooper#277 - Switch from updateOne to replaceOne to mat…
…ch changed semantics in the

MongoDB 3.0 driver.

Created tests for the basic DB operations.

Updated MongoDB Inc. Driver version to 3.0.2.

jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016

jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016

Merge pull request brianfrankcooper#280 from allanbank/ycsb_277
[mongodb] Fix brianfrankcooper#277 - Switch from updateOne to replaceOne.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.