Skip to content

Duplicate Key Error in BlockchainWriter onCreateBatchSuccess #813

Description

@lautarodragan

I'm finding this a lot in the QA environment logs.

{  
   "msg":"Anchor request failure",
   "module":"BlockchainWriter",
   "file":"Router",
   "method":"onCreateBatchSuccess",
   "error":{  
      "driver":true,
      "name":"MongoError",
      "index":0,
      "code":11000,
      "errmsg":"E11000 duplicate key error collection: regtest.blockchainWriter index: ipfsDirectoryHash_1 dup key: { : \"QmbuvwFrxRu54uLkF12Ch3LiBZyA8vRTiQ2rfPenM3jxX7\" }",
      "stack":[  
         "MongoError: E11000 duplicate key error collection: regtest.blockchainWriter index: ipfsDirectoryHash_1 dup key: { : \"QmbuvwFrxRu54uLkF12Ch3LiBZyA8vRTiQ2rfPenM3jxX7\" }",
         "    at Function.create (/usr/src/app/node_modules/mongodb-core/lib/error.js:43:12)",
         "    at toError (/usr/src/app/node_modules/mongodb/lib/utils.js:149:22)",
         "    at coll.s.topology.insert (/usr/src/app/node_modules/mongodb/lib/operations/collection_ops.js:844:39)",
         "    at handler (/usr/src/app/node_modules/mongodb-core/lib/topologies/replset.js:1195:22)",
         "    at /usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:532:18",
         "    at process._tickCallback (internal/process/next_tick.js:61:11)"
      ],
      "message":"E11000 duplicate key error collection: regtest.blockchainWriter index: ipfsDirectoryHash_1 dup key: { : \"QmbuvwFrxRu54uLkF12Ch3LiBZyA8vRTiQ2rfPenM3jxX7\" }",
      "type":"MongoError"
   },
   "ipfsDirectoryHash":"QmbuvwFrxRu54uLkF12Ch3LiBZyA8vRTiQ2rfPenM3jxX7",
   "v":1
}

I think there is one for each POST request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions