{"action":"opened","number":379,"pull_request":{"url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls/379","id":78295935,"html_url":"https://github.com/spring-projects/spring-data-mongodb/pull/379","diff_url":"https://github.com/spring-projects/spring-data-mongodb/pull/379.diff","patch_url":"https://github.com/spring-projects/spring-data-mongodb/pull/379.patch","issue_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues/379","number":379,"state":"open","locked":false,"title":"DATAMONGO-1464 Pagination - Optimize out the count query for paging.","user":{"login":"mp911de","id":1035015,"avatar_url":"https://avatars.githubusercontent.com/u/1035015?v=3","gravatar_id":"","url":"https://api.github.com/users/mp911de","html_url":"https://github.com/mp911de","followers_url":"https://api.github.com/users/mp911de/followers","following_url":"https://api.github.com/users/mp911de/following{/other_user}","gists_url":"https://api.github.com/users/mp911de/gists{/gist_id}","starred_url":"https://api.github.com/users/mp911de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mp911de/subscriptions","organizations_url":"https://api.github.com/users/mp911de/orgs","repos_url":"https://api.github.com/users/mp911de/repos","events_url":"https://api.github.com/users/mp911de/events{/privacy}","received_events_url":"https://api.github.com/users/mp911de/received_events","type":"User","site_admin":false},"body":"We execute paged queries now in an optimized way. The data is obtained for each paged execution but the count query is deferred. We determine the total from the pageable and the results in which we don't hit the page size bounds (i.e. results are less than a full page without offset or results are greater 0 and less than a full page with offset). In all other cases we issue an additional count query.\r\n\r\n----\r\n\r\nRelated ticket: [DATAMONGO-1464](https://jira.spring.io/browse/DATAMONGO-1464)","created_at":"2016-07-21T10:55:22Z","updated_at":"2016-07-21T10:55:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4634a2042924c3a706125870c64496aba9c8b1ad","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls/379/commits","review_comments_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls/379/comments","review_comment_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues/379/comments","statuses_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/statuses/756d93d4a85f4bac7e0d07147738443f6f30ac79","head":{"label":"spring-projects:issue/DATAMONGO-1464","ref":"issue/DATAMONGO-1464","sha":"756d93d4a85f4bac7e0d07147738443f6f30ac79","user":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":2566570,"name":"spring-data-mongodb","full_name":"spring-projects/spring-data-mongodb","owner":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-projects/spring-data-mongodb","description":"Provide support to increase developer productivity in Java when using MongoDB. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.","fork":false,"url":"https://api.github.com/repos/spring-projects/spring-data-mongodb","forks_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/forks","keys_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/teams","hooks_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/hooks","issue_events_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues/events{/number}","events_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/events","assignees_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/assignees{/user}","branches_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/branches{/branch}","tags_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/tags","blobs_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/languages","stargazers_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/stargazers","contributors_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/contributors","subscribers_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/subscribers","subscription_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/subscription","commits_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/contents/{+path}","compare_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/merges","archive_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/downloads","issues_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues{/number}","pulls_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/labels{/name}","releases_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/releases{/id}","deployments_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/deployments","created_at":"2011-10-13T01:06:55Z","updated_at":"2016-07-21T10:19:23Z","pushed_at":"2016-07-21T10:55:22Z","git_url":"git://github.com/spring-projects/spring-data-mongodb.git","ssh_url":"git@github.com:spring-projects/spring-data-mongodb.git","clone_url":"https://github.com/spring-projects/spring-data-mongodb.git","svn_url":"https://github.com/spring-projects/spring-data-mongodb","homepage":"http://www.springsource.org/spring-data/mongodb","size":16308,"stargazers_count":534,"watchers_count":534,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":446,"mirror_url":null,"open_issues_count":31,"forks":446,"open_issues":31,"watchers":534,"default_branch":"master"}},"base":{"label":"spring-projects:master","ref":"master","sha":"325bcd11b95970bf880d9f664526c68a22fce9cd","user":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":2566570,"name":"spring-data-mongodb","full_name":"spring-projects/spring-data-mongodb","owner":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-projects/spring-data-mongodb","description":"Provide support to increase developer productivity in Java when using MongoDB. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.","fork":false,"url":"https://api.github.com/repos/spring-projects/spring-data-mongodb","forks_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/forks","keys_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/teams","hooks_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/hooks","issue_events_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues/events{/number}","events_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/events","assignees_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/assignees{/user}","branches_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/branches{/branch}","tags_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/tags","blobs_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/languages","stargazers_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/stargazers","contributors_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/contributors","subscribers_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/subscribers","subscription_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/subscription","commits_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/contents/{+path}","compare_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/merges","archive_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/downloads","issues_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues{/number}","pulls_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/labels{/name}","releases_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/releases{/id}","deployments_url":"https://api.github.com/repos/spring-projects/spring-data-mongodb/deployments","created_at":"2011-10-13T01:06:55Z","updated_at":"2016-07-21T10:19:23Z","pushed_at":"2016-07-21T10:55:22Z","git_url":"git://github.com/spring-projects/spring-data-mongodb.git","ssh_url":"git@github.com:spring-projects/spring-data-mongodb.git","clone_url":"https://github.com/spring-projects/spring-data-mongodb.git","svn_url":"https://github.com/spring-projects/spring-data-mongodb","homepage":"http://www.springsource.org/spring-data/mongodb","size":16308,"stargazers_count":534,"watchers_count":534,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":446,"mirror_url":null,"open_issues_count":31,"forks":446,"open_issues":31,"watchers":534,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls/379"},"html":{"href":"https://github.com/spring-projects/spring-data-mongodb/pull/379"},"issue":{"href":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues/379"},"comments":{"href":"https://api.github.com/repos/spring-projects/spring-data-mongodb/issues/379/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls/379/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-projects/spring-data-mongodb/pulls/379/commits"},"statuses":{"href":"https://api.github.com/repos/spring-projects/spring-data-mongodb/statuses/756d93d4a85f4bac7e0d07147738443f6f30ac79"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":302,"deletions":62,"changed_files":12}}
{"actor":{"display_login":"mp911de"}}