{"action":"created","issue":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1289","repository_url":"https://api.github.com/repos/telefonicaid/fiware-orion","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1289/labels{/name}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1289/comments","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1289/events","html_url":"https://github.com/telefonicaid/fiware-orion/issues/1289","id":108274970,"number":1289,"title":"[BUG] when is exceeded the index key limit in mongo","user":{"login":"iariasleon","id":4330098,"avatar_url":"https://avatars.githubusercontent.com/u/4330098?v=3","gravatar_id":"","url":"https://api.github.com/users/iariasleon","html_url":"https://github.com/iariasleon","followers_url":"https://api.github.com/users/iariasleon/followers","following_url":"https://api.github.com/users/iariasleon/following{/other_user}","gists_url":"https://api.github.com/users/iariasleon/gists{/gist_id}","starred_url":"https://api.github.com/users/iariasleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iariasleon/subscriptions","organizations_url":"https://api.github.com/users/iariasleon/orgs","repos_url":"https://api.github.com/users/iariasleon/repos","events_url":"https://api.github.com/users/iariasleon/events{/privacy}","received_events_url":"https://api.github.com/users/iariasleon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/APIv2","name":"APIv2","color":"5319e7"},{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/P8","name":"P8","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"kzangeli","id":5338380,"avatar_url":"https://avatars.githubusercontent.com/u/5338380?v=3","gravatar_id":"","url":"https://api.github.com/users/kzangeli","html_url":"https://github.com/kzangeli","followers_url":"https://api.github.com/users/kzangeli/followers","following_url":"https://api.github.com/users/kzangeli/following{/other_user}","gists_url":"https://api.github.com/users/kzangeli/gists{/gist_id}","starred_url":"https://api.github.com/users/kzangeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzangeli/subscriptions","organizations_url":"https://api.github.com/users/kzangeli/orgs","repos_url":"https://api.github.com/users/kzangeli/repos","events_url":"https://api.github.com/users/kzangeli/events{/privacy}","received_events_url":"https://api.github.com/users/kzangeli/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones/23","html_url":"https://github.com/telefonicaid/fiware-orion/milestones/1.0.0","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones/23/labels","id":1437095,"number":23,"title":"1.0.0","description":"","creator":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars.githubusercontent.com/u/1534240?v=3","gravatar_id":"","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":16,"state":"open","created_at":"2015-12-01T10:17:23Z","updated_at":"2016-03-09T09:52:52Z","due_on":"2016-03-30T22:00:00Z","closed_at":null},"comments":21,"created_at":"2015-09-25T07:04:53Z","updated_at":"2016-03-09T09:52:52Z","closed_at":null,"body":"the index key limit in mongo is 1024, see issue https://github.com/telefonicaid/fiware-orion/issues/1283\r\n\r\nif `type` or `id` exceed index key limit ,CB responds 201 and nothing is stored in mongo.\r\n\r\n#### Request:\r\n```\r\n POST http://qa-orion-fe-01:1026/v2/entities\r\n  Content-Type: application/json\r\n  Fiware-Service: test_entities_type\r\n  Fiware-ServicePath: /test\r\n  {\"type\": \"TZQIpnz4YX7NgOo2DCSJ6llpviu6mG2Xc2H7MqPaJy9fGRtUcjg1UmguN39pwSKkFJpIJJ1n4RGwjJBkk5iGDl7OY1RW5dZRKQ6hKCSSufXZqm02ECdoqQWnjR6WZ5PGJMRpSmnrVbdZMKfXkJ04WiCUekxiLxgHM6ToydSt8XZ2yDdYcXpXBSVOx66bIi8CoImJAqLYc39apAF77hI1Y1RPksM1S8z9d5sVp0IxhnFN27Al72XXQDqwSTW7YUZyJJeXzM9OI4lQY0CnZLignlNqxiW8Hr4SfZrqWhailwIZ9Q6FyWfjhcSrWK2RF89kVkGIt9DuO7yaGQ5ONCessB2f8rab0CVvVC6WGafUtvDJs8raCQfEzMnLZ2PW6jDMFH1RXPAoxRN78Ho1QLgJB4YVqUWjgB4ZMQCWFQbaG0fSMAImLyzwqjSAoIbobooQzKjaL6aZzIYV1HlVsZSzrnlz68cHD62ZQxIjxsTjPjk2jlXAPCWi23KO4XOB3x9NrzYN2Eh0aN4VDCHfnFQWj4LkqoF2LbZLYonLLrty9yLRqUD1Sq4dpHO52HTWI6dh9LZI0oT4spnPHNmlnsifjatn3e6hmH6gFiXiyXKdndptaHUVaI8GwDr6zeQH0GYlfw4Ho46iaECauPbpgD9YONA0kAl8BFZpL83yz3pJyhRNK4vCWHS676PBEGr8GXBkwTScge5f2pACnvfNmHbrPtm1FHuZ6ZRH318hBt7p98XSF757lz3ML2ixoecLBORRTBgHto95feclNIyrbRgZ9LiOfQrifoagfhGh04eLN6dPCt3mXDmirYR6kU2xUGOmGug4QM1OKUyWUK8vPCqfG4iu4Klt9Pv2s1ttPHmloeEvZ580b7AODyxQqWhHbVJ0OmAJ02h14ONdkvGKDBBzcmh5cFiTDMZDRMFU88NnTQJkFoEBjtz6OYkRdR2U1ctpPXyYkFP0xednTNl6cC9oRz7vXiOXFDozYFPV3lZqeenIsPlQhFpqim11DxTdEbqM\", \"temperature\": \"34\", \"id\": \"room_1\"}\r\n```\r\n\r\n#### Response\r\n```\r\nhttp code: 201\r\n content-length: 0\r\n```\r\n\r\n#### Log \r\n```\r\ntime=2015-09-25T08:56:09.696CEST | lvl=INFO | trans=1443164167-603-00000000003 | function=processContextElement | comp=Orion | msg=MongoCommonUpdate.cpp[2328]: Database Operation Successful ({ _id.id: \"room_1\", _id.type: \"TZQIpnz4YX7NgOo2DCSJ6llpviu6mG2Xc2H7MqPaJy9fGRtUcjg1UmguN39pwSKkFJpIJJ1n4RGwjJBkk5iGDl7OY1RW5dZRKQ6hKCSSufXZqm02ECdoqQWnjR6WZ5PGJMRpSmnrVbdZMKfXkJ04Wi...\", _id.servicePath: /^\\/test$/ })\r\ntime=2015-09-25T08:56:09.696CEST | lvl=INFO | trans=1443164167-603-00000000003 | function=processContextElement | comp=Orion | msg=MongoCommonUpdate.cpp[2388]: Database Operation Successful ({ _id.id: \"room_1\", _id.type: \"TZQIpnz4YX7NgOo2DCSJ6llpviu6mG2Xc2H7MqPaJy9fGRtUcjg1UmguN39pwSKkFJpIJJ1n4RGwjJBkk5iGDl7OY1RW5dZRKQ6hKCSSufXZqm02ECdoqQWnjR6WZ5PGJMRpSmnrVbdZMKfXkJ04Wi...\", _id.servicePath: /^\\/test$/ })\r\ntime=2015-09-25T08:56:09.698CEST | lvl=ERROR | trans=1443164167-603-00000000003 | function=createEntity | comp=Orion | msg=MongoCommonUpdate.cpp[1993]: Database Error (Database Error: collection: orion.entities - insert(): { _id: { id: \"room_1\", type: \"TZQIpnz4YX7NgOo2DCSJ6llpviu6mG2Xc2H7MqPaJy9fGRtUcjg1UmguN39pwSKkFJpIJJ1n4RGwjJBkk5iGDl7OY1RW5dZRKQ6hKCSSufXZqm02ECdoqQWnjR6WZ5PGJMRpSmnrVbdZMKfXkJ04Wi...\", servicePath: \"/test\" }, attrNames: [ \"temperature\" ], attrs: { temperature: { type: \"\", creDate: 1443164169, modDate: 1443164169, value: \"34\" } }, creDate: 1443164169, modDate: 1443164169 } - exception: OperationException: { index: 0, code: 17280, errmsg: \"insertDocument :: caused by :: 17280 Btree::insert: key too large to index, failing orion.entities.$_id_ 1086 { : { id: \"room_1\", type: \"TZQIpnz4YX7Ng...\", op: { _id: { id: \"room_1\", type: \"TZQIpnz4YX7NgOo2DCSJ6llpviu6mG2Xc2H7MqPaJy9fGRtUcjg1UmguN39pwSKkFJpIJJ1n4RGwjJBkk5iGDl7OY1RW5dZRKQ6hKCSSufXZqm02ECdoqQWnjR6WZ5PGJMRpSmnrVbdZMKfXkJ04Wi...\", servicePath: \"/test\" }, attrNames: [ \"temperature\" ], attrs: { temperature: { type: \"\", creDate: 1443164169, modDate: 1443164169, value: \"34\" } }, creDate: 1443164169, modDate: 1443164169 } })\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments/194215694","html_url":"https://github.com/telefonicaid/fiware-orion/issues/1289#issuecomment-194215694","issue_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1289","id":194215694,"user":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars.githubusercontent.com/u/1534240?v=3","gravatar_id":"","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T09:52:52Z","updated_at":"2016-03-09T09:52:52Z","body":"The \"formula\" being used should be in the code. @kzangeli , @fortizc , could you help to locate it an add it as comment to this issue, please?\r\n\r\n(Reopening issue while the answer is in progress)"}}