{"action":"created","comment":{"url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/comments/80136540","id":80136540,"diff_hunk":"@@ -419,4 +433,16 @@ private CacheKeyException( final Throwable cause ) {\n       super( cause );\n     }\n   }\n+\n+  private int getReportTotalRows( final String key ) {\n+    final Map<String, Serializable> metaData = getCachedMetaData( key );\n+    if ( metaData != null ) {\n+      final Object reportTotalRows = metaData.get( REPORT_ROWS );\n+      if ( reportTotalRows != null ) {\n+        return (int) reportTotalRows;\n+      }\n+    }\n+    return 0;","path":"src/org/pentaho/reporting/platform/plugin/output/CachingPageableHTMLOutput.java","position":88,"original_position":88,"commit_id":"9cf2b4eff1d1b0f30d4bd35b8652d740fdf540d0","original_commit_id":"9cf2b4eff1d1b0f30d4bd35b8652d740fdf540d0","user":{"login":"tmorgner","id":1856999,"avatar_url":"https://avatars.githubusercontent.com/u/1856999?v=3","gravatar_id":"","url":"https://api.github.com/users/tmorgner","html_url":"https://github.com/tmorgner","followers_url":"https://api.github.com/users/tmorgner/followers","following_url":"https://api.github.com/users/tmorgner/following{/other_user}","gists_url":"https://api.github.com/users/tmorgner/gists{/gist_id}","starred_url":"https://api.github.com/users/tmorgner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmorgner/subscriptions","organizations_url":"https://api.github.com/users/tmorgner/orgs","repos_url":"https://api.github.com/users/tmorgner/repos","events_url":"https://api.github.com/users/tmorgner/events{/privacy}","received_events_url":"https://api.github.com/users/tmorgner/received_events","type":"User","site_admin":false},"body":"If there is no valid result, I feel it might be not so nice to pretend you have one. Zero rows is a valid result if your table-model returned has no rows (SELECT * FROM x WHERE FALSE). So returning \"-1\" here might help keep the API's response clean.\r\n\r\nIf you return \"0\" here, you actually set the row-limit in the UI to zero (see RowLimitControl, line 110). If you return -1, you have a way of detecting this kind of bad state and you can leave the UI unchanged; and hopefully with the next full generation you get a valid result.\r\n\r\n(You would only get to this point if the cache go cleared out between your first call to get the report-content and the second call here where you get the metadata. Would not happen in our implementation, but as the interfaces are public for OEMs, they can create their own backends which then may evict content at random points in time. The only way to avoid that race condition would be to combine the reading of the content and the metadata into one single operation so that either both items are available or none is. But lets not start with such a rewrite, lets handle the error in a predictable way instead.)","created_at":"2016-09-22T21:06:28Z","updated_at":"2016-09-22T21:06:28Z","html_url":"https://github.com/pentaho/pentaho-platform-plugin-reporting/pull/432#discussion_r80136540","pull_request_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/432","_links":{"self":{"href":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/comments/80136540"},"html":{"href":"https://github.com/pentaho/pentaho-platform-plugin-reporting/pull/432#discussion_r80136540"},"pull_request":{"href":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/432"}}},"pull_request":{"url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/432","id":86330814,"html_url":"https://github.com/pentaho/pentaho-platform-plugin-reporting/pull/432","diff_url":"https://github.com/pentaho/pentaho-platform-plugin-reporting/pull/432.diff","patch_url":"https://github.com/pentaho/pentaho-platform-plugin-reporting/pull/432.patch","issue_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/issues/432","number":432,"state":"open","locked":false,"title":"[BACKLOG-6859]-Row limit in reportviewer","user":{"login":"EgorZhuk","id":3796335,"avatar_url":"https://avatars.githubusercontent.com/u/3796335?v=3","gravatar_id":"","url":"https://api.github.com/users/EgorZhuk","html_url":"https://github.com/EgorZhuk","followers_url":"https://api.github.com/users/EgorZhuk/followers","following_url":"https://api.github.com/users/EgorZhuk/following{/other_user}","gists_url":"https://api.github.com/users/EgorZhuk/gists{/gist_id}","starred_url":"https://api.github.com/users/EgorZhuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EgorZhuk/subscriptions","organizations_url":"https://api.github.com/users/EgorZhuk/orgs","repos_url":"https://api.github.com/users/EgorZhuk/repos","events_url":"https://api.github.com/users/EgorZhuk/events{/privacy}","received_events_url":"https://api.github.com/users/EgorZhuk/received_events","type":"User","site_admin":false},"body":"Lets' see wingman's report, some tests are definitely needed.\r\n\r\n@tmorgner this one contains the work from #420 but UI is moved to common-ui + some scheduling logic  is implemented","created_at":"2016-09-22T12:49:40Z","updated_at":"2016-09-22T21:08:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66ac7a12692876011f7f0f50baaf0a3ef4a81859","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/432/commits","review_comments_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/432/comments","review_comment_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/issues/432/comments","statuses_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/statuses/9cf2b4eff1d1b0f30d4bd35b8652d740fdf540d0","head":{"label":"EgorZhuk:BACKLOG-6859","ref":"BACKLOG-6859","sha":"9cf2b4eff1d1b0f30d4bd35b8652d740fdf540d0","user":{"login":"EgorZhuk","id":3796335,"avatar_url":"https://avatars.githubusercontent.com/u/3796335?v=3","gravatar_id":"","url":"https://api.github.com/users/EgorZhuk","html_url":"https://github.com/EgorZhuk","followers_url":"https://api.github.com/users/EgorZhuk/followers","following_url":"https://api.github.com/users/EgorZhuk/following{/other_user}","gists_url":"https://api.github.com/users/EgorZhuk/gists{/gist_id}","starred_url":"https://api.github.com/users/EgorZhuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EgorZhuk/subscriptions","organizations_url":"https://api.github.com/users/EgorZhuk/orgs","repos_url":"https://api.github.com/users/EgorZhuk/repos","events_url":"https://api.github.com/users/EgorZhuk/events{/privacy}","received_events_url":"https://api.github.com/users/EgorZhuk/received_events","type":"User","site_admin":false},"repo":{"id":51067707,"name":"pentaho-platform-plugin-reporting","full_name":"EgorZhuk/pentaho-platform-plugin-reporting","owner":{"login":"EgorZhuk","id":3796335,"avatar_url":"https://avatars.githubusercontent.com/u/3796335?v=3","gravatar_id":"","url":"https://api.github.com/users/EgorZhuk","html_url":"https://github.com/EgorZhuk","followers_url":"https://api.github.com/users/EgorZhuk/followers","following_url":"https://api.github.com/users/EgorZhuk/following{/other_user}","gists_url":"https://api.github.com/users/EgorZhuk/gists{/gist_id}","starred_url":"https://api.github.com/users/EgorZhuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EgorZhuk/subscriptions","organizations_url":"https://api.github.com/users/EgorZhuk/orgs","repos_url":"https://api.github.com/users/EgorZhuk/repos","events_url":"https://api.github.com/users/EgorZhuk/events{/privacy}","received_events_url":"https://api.github.com/users/EgorZhuk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EgorZhuk/pentaho-platform-plugin-reporting","description":"","fork":true,"url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting","forks_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/forks","keys_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/teams","hooks_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/hooks","issue_events_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/issues/events{/number}","events_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/events","assignees_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/assignees{/user}","branches_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/branches{/branch}","tags_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/tags","blobs_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/git/refs{/sha}","trees_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/statuses/{sha}","languages_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/languages","stargazers_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/stargazers","contributors_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/contributors","subscribers_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/subscribers","subscription_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/subscription","commits_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/commits{/sha}","git_commits_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/git/commits{/sha}","comments_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/comments{/number}","issue_comment_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/issues/comments{/number}","contents_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/contents/{+path}","compare_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/merges","archive_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/downloads","issues_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/issues{/number}","pulls_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/pulls{/number}","milestones_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/milestones{/number}","notifications_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/labels{/name}","releases_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/releases{/id}","deployments_url":"https://api.github.com/repos/EgorZhuk/pentaho-platform-plugin-reporting/deployments","created_at":"2016-02-04T10:10:40Z","updated_at":"2016-02-04T10:10:41Z","pushed_at":"2016-09-22T14:03:56Z","git_url":"git://github.com/EgorZhuk/pentaho-platform-plugin-reporting.git","ssh_url":"git@github.com:EgorZhuk/pentaho-platform-plugin-reporting.git","clone_url":"https://github.com/EgorZhuk/pentaho-platform-plugin-reporting.git","svn_url":"https://github.com/EgorZhuk/pentaho-platform-plugin-reporting","homepage":null,"size":9110,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pentaho:master","ref":"master","sha":"135c1cdaf2473739ee77dffae11418708c36dfe0","user":{"login":"pentaho","id":1022787,"avatar_url":"https://avatars.githubusercontent.com/u/1022787?v=3","gravatar_id":"","url":"https://api.github.com/users/pentaho","html_url":"https://github.com/pentaho","followers_url":"https://api.github.com/users/pentaho/followers","following_url":"https://api.github.com/users/pentaho/following{/other_user}","gists_url":"https://api.github.com/users/pentaho/gists{/gist_id}","starred_url":"https://api.github.com/users/pentaho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pentaho/subscriptions","organizations_url":"https://api.github.com/users/pentaho/orgs","repos_url":"https://api.github.com/users/pentaho/repos","events_url":"https://api.github.com/users/pentaho/events{/privacy}","received_events_url":"https://api.github.com/users/pentaho/received_events","type":"Organization","site_admin":false},"repo":{"id":4599064,"name":"pentaho-platform-plugin-reporting","full_name":"pentaho/pentaho-platform-plugin-reporting","owner":{"login":"pentaho","id":1022787,"avatar_url":"https://avatars.githubusercontent.com/u/1022787?v=3","gravatar_id":"","url":"https://api.github.com/users/pentaho","html_url":"https://github.com/pentaho","followers_url":"https://api.github.com/users/pentaho/followers","following_url":"https://api.github.com/users/pentaho/following{/other_user}","gists_url":"https://api.github.com/users/pentaho/gists{/gist_id}","starred_url":"https://api.github.com/users/pentaho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pentaho/subscriptions","organizations_url":"https://api.github.com/users/pentaho/orgs","repos_url":"https://api.github.com/users/pentaho/repos","events_url":"https://api.github.com/users/pentaho/events{/privacy}","received_events_url":"https://api.github.com/users/pentaho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pentaho/pentaho-platform-plugin-reporting","description":"","fork":false,"url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting","forks_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/forks","keys_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/teams","hooks_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/hooks","issue_events_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/issues/events{/number}","events_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/events","assignees_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/assignees{/user}","branches_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/branches{/branch}","tags_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/tags","blobs_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/git/refs{/sha}","trees_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/statuses/{sha}","languages_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/languages","stargazers_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/stargazers","contributors_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/contributors","subscribers_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/subscribers","subscription_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/subscription","commits_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/commits{/sha}","git_commits_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/git/commits{/sha}","comments_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/comments{/number}","issue_comment_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/issues/comments{/number}","contents_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/contents/{+path}","compare_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/merges","archive_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/downloads","issues_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/issues{/number}","pulls_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls{/number}","milestones_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/milestones{/number}","notifications_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/labels{/name}","releases_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/releases{/id}","deployments_url":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/deployments","created_at":"2012-06-08T15:39:17Z","updated_at":"2016-04-08T15:06:52Z","pushed_at":"2016-09-22T19:19:08Z","git_url":"git://github.com/pentaho/pentaho-platform-plugin-reporting.git","ssh_url":"git@github.com:pentaho/pentaho-platform-plugin-reporting.git","clone_url":"https://github.com/pentaho/pentaho-platform-plugin-reporting.git","svn_url":"https://github.com/pentaho/pentaho-platform-plugin-reporting","homepage":null,"size":10390,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":80,"mirror_url":null,"open_issues_count":2,"forks":80,"open_issues":2,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/432"},"html":{"href":"https://github.com/pentaho/pentaho-platform-plugin-reporting/pull/432"},"issue":{"href":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/issues/432"},"comments":{"href":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/issues/432/comments"},"review_comments":{"href":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/432/comments"},"review_comment":{"href":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/pulls/432/commits"},"statuses":{"href":"https://api.github.com/repos/pentaho/pentaho-platform-plugin-reporting/statuses/9cf2b4eff1d1b0f30d4bd35b8652d740fdf540d0"}}}}
{"actor":{"display_login":"tmorgner"}}