{"action":"created","issue":{"url":"https://api.github.com/repos/fiorix/txmongo/issues/71","labels_url":"https://api.github.com/repos/fiorix/txmongo/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/fiorix/txmongo/issues/71/comments","events_url":"https://api.github.com/repos/fiorix/txmongo/issues/71/events","html_url":"https://github.com/fiorix/txmongo/pull/71","id":60103162,"number":71,"title":"Various changes","user":{"login":"IlyaSkriblovsky","id":909638,"avatar_url":"https://avatars.githubusercontent.com/u/909638?v=3","gravatar_id":"","url":"https://api.github.com/users/IlyaSkriblovsky","html_url":"https://github.com/IlyaSkriblovsky","followers_url":"https://api.github.com/users/IlyaSkriblovsky/followers","following_url":"https://api.github.com/users/IlyaSkriblovsky/following{/other_user}","gists_url":"https://api.github.com/users/IlyaSkriblovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/IlyaSkriblovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IlyaSkriblovsky/subscriptions","organizations_url":"https://api.github.com/users/IlyaSkriblovsky/orgs","repos_url":"https://api.github.com/users/IlyaSkriblovsky/repos","events_url":"https://api.github.com/users/IlyaSkriblovsky/events{/privacy}","received_events_url":"https://api.github.com/users/IlyaSkriblovsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-06T13:44:11Z","updated_at":"2015-03-06T16:51:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fiorix/txmongo/pulls/71","html_url":"https://github.com/fiorix/txmongo/pull/71","diff_url":"https://github.com/fiorix/txmongo/pull/71.diff","patch_url":"https://github.com/fiorix/txmongo/pull/71.patch"},"body":"Hi!\r\n\r\nI'm suggesting my changes made to txmongo while using it in production in my project.\r\n\r\nThe most important is 477f34a1, it fixes the following bug:\r\nif find() is called with limit specified and the requested number of documents was returned by MongoDB in single batch, then to_fetch variable is set to zero and Getmore is called with n_to_return=0 which make MongoDB to return full next 16Mb-batch of documents although the requested number of them was already returned in the first batch. So, if you call find(limit=100) then MongoDB will return first batch with 100 documents, but also it will send the second unneeded batch with 16Mb of documents.\r\nThis bug was a huge performance issue for me.\r\n\r\nAlso, current implementation of find() doesn't close MongoDB cursors. To fix this, I also fixed KillCursors command serialization which was broken.\r\n\r\nAlso I've fixed 'hint' filter. It was incorrectly serialized with double dollar signs.\r\n\r\nBest regards,\r\n  Ilya"},"comment":{"url":"https://api.github.com/repos/fiorix/txmongo/issues/comments/77592454","html_url":"https://github.com/fiorix/txmongo/pull/71#issuecomment-77592454","issue_url":"https://api.github.com/repos/fiorix/txmongo/issues/71","id":77592454,"user":{"login":"fiorix","id":129742,"avatar_url":"https://avatars.githubusercontent.com/u/129742?v=3","gravatar_id":"","url":"https://api.github.com/users/fiorix","html_url":"https://github.com/fiorix","followers_url":"https://api.github.com/users/fiorix/followers","following_url":"https://api.github.com/users/fiorix/following{/other_user}","gists_url":"https://api.github.com/users/fiorix/gists{/gist_id}","starred_url":"https://api.github.com/users/fiorix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fiorix/subscriptions","organizations_url":"https://api.github.com/users/fiorix/orgs","repos_url":"https://api.github.com/users/fiorix/repos","events_url":"https://api.github.com/users/fiorix/events{/privacy}","received_events_url":"https://api.github.com/users/fiorix/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T16:51:53Z","updated_at":"2015-03-06T16:51:53Z","body":"Waiting till others can review and if there are no objections I'll merge it in tomorrow."}}