{"action":"created","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/5157","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/5157/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/5157/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/5157/events","html_url":"https://github.com/rethinkdb/rethinkdb/issues/5157","id":119561906,"number":5157,"title":"Hanging `include_initial` `get_all`","user":{"login":"danielmewes","id":505365,"avatar_url":"https://avatars.githubusercontent.com/u/505365?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmewes","html_url":"https://github.com/danielmewes","followers_url":"https://api.github.com/users/danielmewes/followers","following_url":"https://api.github.com/users/danielmewes/following{/other_user}","gists_url":"https://api.github.com/users/danielmewes/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmewes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmewes/subscriptions","organizations_url":"https://api.github.com/users/danielmewes/orgs","repos_url":"https://api.github.com/users/danielmewes/repos","events_url":"https://api.github.com/users/danielmewes/events{/privacy}","received_events_url":"https://api.github.com/users/danielmewes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/labels/pr:high","name":"pr:high","color":"e10c02"},{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/labels/st:review","name":"st:review","color":"fbda04"},{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/labels/tp:bug","name":"tp:bug","color":"e102d8"}],"state":"closed","locked":false,"assignee":{"login":"mlucy","id":1777134,"avatar_url":"https://avatars.githubusercontent.com/u/1777134?v=3","gravatar_id":"","url":"https://api.github.com/users/mlucy","html_url":"https://github.com/mlucy","followers_url":"https://api.github.com/users/mlucy/followers","following_url":"https://api.github.com/users/mlucy/following{/other_user}","gists_url":"https://api.github.com/users/mlucy/gists{/gist_id}","starred_url":"https://api.github.com/users/mlucy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlucy/subscriptions","organizations_url":"https://api.github.com/users/mlucy/orgs","repos_url":"https://api.github.com/users/mlucy/repos","events_url":"https://api.github.com/users/mlucy/events{/privacy}","received_events_url":"https://api.github.com/users/mlucy/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/104","html_url":"https://github.com/rethinkdb/rethinkdb/milestones/2.2.x","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/104/labels","id":1249551,"number":104,"title":"2.2.x","description":"","creator":{"login":"danielmewes","id":505365,"avatar_url":"https://avatars.githubusercontent.com/u/505365?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmewes","html_url":"https://github.com/danielmewes","followers_url":"https://api.github.com/users/danielmewes/followers","following_url":"https://api.github.com/users/danielmewes/following{/other_user}","gists_url":"https://api.github.com/users/danielmewes/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmewes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmewes/subscriptions","organizations_url":"https://api.github.com/users/danielmewes/orgs","repos_url":"https://api.github.com/users/danielmewes/repos","events_url":"https://api.github.com/users/danielmewes/events{/privacy}","received_events_url":"https://api.github.com/users/danielmewes/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":16,"state":"open","created_at":"2015-08-11T07:18:11Z","updated_at":"2015-12-15T11:30:43Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2015-11-30T19:25:32Z","updated_at":"2015-12-15T19:26:00Z","closed_at":"2015-12-15T09:52:07Z","body":"@tatsujin1 reported this issue on Slack:\r\n> in my test with 25000 documents a simple indexed query (using `get_all`) takes 50ms, no problem, but ​sometimes​ it can take over 30 seconds...\r\n> this during frequent changes to the documents.\r\n> oh, forgot to mention that the query is a changefeed, using\r\n`include_initial`.... and the initial documents are received quite quickly, but the `ready` state document is not received until much later.\r\n> query result is about 1000 documents\r\n> sometimes it can even hang completely... and stopping the modifications at this time does not make the query's initial batch to be returned any faster...\r\n> my complete query is simply:  `r.db('thedb').table('thetable').get_all(3, index='value').changes(include_initial=True, include_states=True).run()`\r\n> in fact, it seems that if the `ready` state is not received within ~1 second - and at that time stopping the process modifying the table - the ready state will never be received\r\n\r\nAlso:\r\n> just tried leaving the query running longer for once, and its still hanged after about ~1 hour\r\n\r\nCPU load on the database was low, and judging from the load value of just 0.6 to 1.5, I suspect that i/o was also not a major bottleneck here.\r\n\r\n@mlucy Could you take this one please?"},"comment":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/comments/164865667","html_url":"https://github.com/rethinkdb/rethinkdb/issues/5157#issuecomment-164865667","issue_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/5157","id":164865667,"user":{"login":"williamstein","id":1276278,"avatar_url":"https://avatars.githubusercontent.com/u/1276278?v=3","gravatar_id":"","url":"https://api.github.com/users/williamstein","html_url":"https://github.com/williamstein","followers_url":"https://api.github.com/users/williamstein/followers","following_url":"https://api.github.com/users/williamstein/following{/other_user}","gists_url":"https://api.github.com/users/williamstein/gists{/gist_id}","starred_url":"https://api.github.com/users/williamstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamstein/subscriptions","organizations_url":"https://api.github.com/users/williamstein/orgs","repos_url":"https://api.github.com/users/williamstein/repos","events_url":"https://api.github.com/users/williamstein/events{/privacy}","received_events_url":"https://api.github.com/users/williamstein/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T19:26:00Z","updated_at":"2015-12-15T19:26:00Z","body":"Thanks!!!"}}