[ https://jira.fiware.org/browse/HELP-16179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez updated HELP-16179: ---------------------------------- Status: In Progress (was: Open) > [fiware-stackoverflow] Enable MongoDB sharding for FIWARE Orion ContextBroker > ----------------------------------------------------------------------------- > > Key: HELP-16179 > URL: https://jira.fiware.org/browse/HELP-16179 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Fermín Galán > Labels: fiware, fiware-orion, mongodb > > Created question in FIWARE Q/A platform on 24-09-2019 at 13:09 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/58079389/enable-mongodb-sharding-for-fiware-orion-contextbroker > +Question:+ > Enable MongoDB sharding for FIWARE Orion ContextBroker > +Description:+ > I am trying to setup MongoDB sharding for the Orion ContextBroker, and IotAgent-Json, I am able to distribute the device provisioning and service data in MongoDb between shards, but whenever i sends the actual device data it gives following error: > { > "name": "ENTITY_GENERIC_ERROR", > "message": "Error accesing entity data for device: DeviceEntity1 of type: DeviceEntity1"} > I am using following command to shard the collection: > sh.shardCollection("orion.entities",{"_id.servicePath": 1, "_id.id": 1, "_id.type": 1}) > Intercept of ContextBroker log: > time=Tuesday 24 Sep 11:19:22 2019.846Z | lvl=ERROR | corr=28ee81ee-debd-11e9-84cc-3464a92017cd | trans=1569323345-406-00000000008 | from=127.0.0.1 | srv=fiwareiot | subsrv=/raw | comp=Orion | op=AlarmManager.cpp[211]:dbError | msg=Raising alarm DatabaseError: collection: orion.entities - update(): <{ _id.id: "DeviceEntity1", _id.type: "DeviceEntity", _id.servicePath: > What MongoDB shard key strategy should i follow, for following composite document id, > there may be multiple document for _id.id and _id.servicePath. > I want to distribute data with "_id.id": "DeviceEntity1" and "_id.id": "DeviceEntity2"in two MongoDB shards. > "_id" : { > "id" : "DeviceEntity1", > "type" : "DeviceEntity", > "servicePath" : "/raw" > },... > Thank You. -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy