{"action":"created","issue":{"url":"https://api.github.com/repos/cargomedia/cm/issues/2309","repository_url":"https://api.github.com/repos/cargomedia/cm","labels_url":"https://api.github.com/repos/cargomedia/cm/issues/2309/labels{/name}","comments_url":"https://api.github.com/repos/cargomedia/cm/issues/2309/comments","events_url":"https://api.github.com/repos/cargomedia/cm/issues/2309/events","html_url":"https://github.com/cargomedia/cm/issues/2309","id":173611418,"number":2309,"title":"performance of mongodb queries to retrieve logs in admin","user":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cargomedia/cm/labels/ready","name":"ready","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"fvovan","id":2360687,"avatar_url":"https://avatars.githubusercontent.com/u/2360687?v=3","gravatar_id":"","url":"https://api.github.com/users/fvovan","html_url":"https://github.com/fvovan","followers_url":"https://api.github.com/users/fvovan/followers","following_url":"https://api.github.com/users/fvovan/following{/other_user}","gists_url":"https://api.github.com/users/fvovan/gists{/gist_id}","starred_url":"https://api.github.com/users/fvovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvovan/subscriptions","organizations_url":"https://api.github.com/users/fvovan/orgs","repos_url":"https://api.github.com/users/fvovan/repos","events_url":"https://api.github.com/users/fvovan/events{/privacy}","received_events_url":"https://api.github.com/users/fvovan/received_events","type":"User","site_admin":false},"assignees":[{"login":"fvovan","id":2360687,"avatar_url":"https://avatars.githubusercontent.com/u/2360687?v=3","gravatar_id":"","url":"https://api.github.com/users/fvovan","html_url":"https://github.com/fvovan","followers_url":"https://api.github.com/users/fvovan/followers","following_url":"https://api.github.com/users/fvovan/following{/other_user}","gists_url":"https://api.github.com/users/fvovan/gists{/gist_id}","starred_url":"https://api.github.com/users/fvovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvovan/subscriptions","organizations_url":"https://api.github.com/users/fvovan/orgs","repos_url":"https://api.github.com/users/fvovan/repos","events_url":"https://api.github.com/users/fvovan/events{/privacy}","received_events_url":"https://api.github.com/users/fvovan/received_events","type":"User","site_admin":false}],"milestone":null,"comments":23,"created_at":"2016-08-27T19:27:23Z","updated_at":"2016-09-30T14:38:17Z","closed_at":null,"body":"It happens again. Probably also related to write queries happening at the same time?\r\n\r\nRelated:\r\nhttps://github.com/cargomedia/cm/pull/2160\r\nhttps://github.com/cargomedia/cm/pull/2228\r\n\r\n```\r\nmongos> db.cm_log.count()\r\n4969165\r\nmongos> db.cm_log.count({level:400})\r\n20805\r\nmongos> db.cm_log.count({level:300})\r\n4193617\r\nmongos> db.cm_log.getIndexes()\r\n[\r\n\t{\r\n\t\t\"v\" : 1,\r\n\t\t\"key\" : {\r\n\t\t\t\"_id\" : 1\r\n\t\t},\r\n\t\t\"name\" : \"_id_\",\r\n\t\t\"ns\" : \"example.cm_log\"\r\n\t},\r\n\t{\r\n\t\t\"v\" : 1,\r\n\t\t\"key\" : {\r\n\t\t\t\"level\" : NumberLong(1),\r\n\t\t\t\"createdAt\" : NumberLong(1)\r\n\t\t},\r\n\t\t\"name\" : \"level_1_createdAt_1\",\r\n\t\t\"ns\" : \"example.cm_log\",\r\n\t\t\"background\" : true\r\n\t},\r\n\t{\r\n\t\t\"v\" : 1,\r\n\t\t\"key\" : {\r\n\t\t\t\"context.extra.type\" : NumberLong(1),\r\n\t\t\t\"level\" : NumberLong(1),\r\n\t\t\t\"createdAt\" : NumberLong(1)\r\n\t\t},\r\n\t\t\"name\" : \"context_extra_type_1_level_1_createdAt_1\",\r\n\t\t\"ns\" : \"example.cm_log\",\r\n\t\t\"background\" : true\r\n\t},\r\n\t{\r\n\t\t\"v\" : 1,\r\n\t\t\"key\" : {\r\n\t\t\t\"message\" : NumberLong(1)\r\n\t\t},\r\n\t\t\"name\" : \"message_1\",\r\n\t\t\"ns\" : \"example.cm_log\",\r\n\t\t\"background\" : true\r\n\t}\r\n]\r\n```"},"comment":{"url":"https://api.github.com/repos/cargomedia/cm/issues/comments/250761345","html_url":"https://github.com/cargomedia/cm/issues/2309#issuecomment-250761345","issue_url":"https://api.github.com/repos/cargomedia/cm/issues/2309","id":250761345,"user":{"login":"fvovan","id":2360687,"avatar_url":"https://avatars.githubusercontent.com/u/2360687?v=3","gravatar_id":"","url":"https://api.github.com/users/fvovan","html_url":"https://github.com/fvovan","followers_url":"https://api.github.com/users/fvovan/followers","following_url":"https://api.github.com/users/fvovan/following{/other_user}","gists_url":"https://api.github.com/users/fvovan/gists{/gist_id}","starred_url":"https://api.github.com/users/fvovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvovan/subscriptions","organizations_url":"https://api.github.com/users/fvovan/orgs","repos_url":"https://api.github.com/users/fvovan/repos","events_url":"https://api.github.com/users/fvovan/events{/privacy}","received_events_url":"https://api.github.com/users/fvovan/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T14:38:17Z","updated_at":"2016-09-30T14:38:17Z","body":"I can't say that setting mandatory type helped a lot.\r\nDespite this trick gave some speed-up at dev environment, sometimes it still throws on production one.\r\n"}}
{"actor":{"display_login":"fvovan"}}