{"action":"created","issue":{"url":"https://api.github.com/repos/apache/cloudstack/issues/1009","labels_url":"https://api.github.com/repos/apache/cloudstack/issues/1009/labels{/name}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/1009/comments","events_url":"https://api.github.com/repos/apache/cloudstack/issues/1009/events","html_url":"https://github.com/apache/cloudstack/pull/1009","id":114197083,"number":1009,"title":"CLOUDSTACK-9006 - ListTemplates API returns result in inconsistent order when called concurrently","user":{"login":"rags22489664","id":1449880,"avatar_url":"https://avatars.githubusercontent.com/u/1449880?v=3","gravatar_id":"","url":"https://api.github.com/users/rags22489664","html_url":"https://github.com/rags22489664","followers_url":"https://api.github.com/users/rags22489664/followers","following_url":"https://api.github.com/users/rags22489664/following{/other_user}","gists_url":"https://api.github.com/users/rags22489664/gists{/gist_id}","starred_url":"https://api.github.com/users/rags22489664/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rags22489664/subscriptions","organizations_url":"https://api.github.com/users/rags22489664/orgs","repos_url":"https://api.github.com/users/rags22489664/repos","events_url":"https://api.github.com/users/rags22489664/events{/privacy}","received_events_url":"https://api.github.com/users/rags22489664/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-30T04:22:27Z","updated_at":"2015-10-30T22:13:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/1009","html_url":"https://github.com/apache/cloudstack/pull/1009","diff_url":"https://github.com/apache/cloudstack/pull/1009.diff","patch_url":"https://github.com/apache/cloudstack/pull/1009.patch"},"body":"The order of templates returned in the response is based on a field called sortkey and by default value for the field is set to 0. \r\n\r\nWith more than 1000 templates, we tried listing the templates with different page sizes concurrently, and we noticed the results being inconsistent.\r\n\r\nThus we added a secondary order by clause to list templates call on tempZonePair column to make sure the results are consistent.\r\n\r\nThe addOrderby method of Filter class was also not appending , if we added more orderby clauses."},"comment":{"url":"https://api.github.com/repos/apache/cloudstack/issues/comments/152662658","html_url":"https://github.com/apache/cloudstack/pull/1009#issuecomment-152662658","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/1009","id":152662658,"user":{"login":"DaanHoogland","id":2486961,"avatar_url":"https://avatars.githubusercontent.com/u/2486961?v=3","gravatar_id":"","url":"https://api.github.com/users/DaanHoogland","html_url":"https://github.com/DaanHoogland","followers_url":"https://api.github.com/users/DaanHoogland/followers","following_url":"https://api.github.com/users/DaanHoogland/following{/other_user}","gists_url":"https://api.github.com/users/DaanHoogland/gists{/gist_id}","starred_url":"https://api.github.com/users/DaanHoogland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaanHoogland/subscriptions","organizations_url":"https://api.github.com/users/DaanHoogland/orgs","repos_url":"https://api.github.com/users/DaanHoogland/repos","events_url":"https://api.github.com/users/DaanHoogland/events{/privacy}","received_events_url":"https://api.github.com/users/DaanHoogland/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T22:13:45Z","updated_at":"2015-10-30T22:13:45Z","body":"code lgtm, but I'm wondering on testing this (in integration sense) I think a unit test would by nice as @bhaisaab. In addition to that if we want to verify the fix from a user perspective what do we do (without having to add 1000+ templetes) @rags22489664 ? Can you give a short description?"}}