{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/67206216","id":67206216,"diff_hunk":"@@ -119,6 +119,8 @@ class ReplicaFetcherThread(name: String,\n \n       if (fetchOffset != replica.logEndOffset.messageOffset)\n         throw new RuntimeException(\"Offset mismatch for partition %s: fetched offset = %d, log end offset = %d.\".format(topicAndPartition, fetchOffset, replica.logEndOffset.messageOffset))\n+      if (!messageSet.isEmpty && messageSet.head.offset < replica.logEndOffset.messageOffset)\n+        throw new RuntimeException(\"Offset error for partition %s: first offset in message set = %d, must not be less than log end offset = %d.\".format(topicAndPartition, messageSet.head.offset, replica.logEndOffset.messageOffset))","path":"core/src/main/scala/kafka/server/ReplicaFetcherThread.scala","position":5,"original_position":5,"commit_id":"ed674a9b3e4b4ab5531326396ef59950a2930467","original_commit_id":"ed674a9b3e4b4ab5531326396ef59950a2930467","user":{"login":"imandhan","id":6530254,"avatar_url":"https://avatars.githubusercontent.com/u/6530254?v=3","gravatar_id":"","url":"https://api.github.com/users/imandhan","html_url":"https://github.com/imandhan","followers_url":"https://api.github.com/users/imandhan/followers","following_url":"https://api.github.com/users/imandhan/following{/other_user}","gists_url":"https://api.github.com/users/imandhan/gists{/gist_id}","starred_url":"https://api.github.com/users/imandhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imandhan/subscriptions","organizations_url":"https://api.github.com/users/imandhan/orgs","repos_url":"https://api.github.com/users/imandhan/repos","events_url":"https://api.github.com/users/imandhan/events{/privacy}","received_events_url":"https://api.github.com/users/imandhan/received_events","type":"User","site_admin":false},"body":"Sure, I'll have the .format() part in the next line in the next patch set with the test case. Thanks","created_at":"2016-06-15T17:24:42Z","updated_at":"2016-06-15T17:24:42Z","html_url":"https://github.com/apache/kafka/pull/1506#discussion_r67206216","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/1506","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/67206216"},"html":{"href":"https://github.com/apache/kafka/pull/1506#discussion_r67206216"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/1506"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/1506","id":73824947,"html_url":"https://github.com/apache/kafka/pull/1506","diff_url":"https://github.com/apache/kafka/pull/1506.diff","patch_url":"https://github.com/apache/kafka/pull/1506.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/1506","number":1506,"state":"open","locked":false,"title":"KAFKA-3755 Tightening the offset check in ReplicaFetcherThread","user":{"login":"imandhan","id":6530254,"avatar_url":"https://avatars.githubusercontent.com/u/6530254?v=3","gravatar_id":"","url":"https://api.github.com/users/imandhan","html_url":"https://github.com/imandhan","followers_url":"https://api.github.com/users/imandhan/followers","following_url":"https://api.github.com/users/imandhan/following{/other_user}","gists_url":"https://api.github.com/users/imandhan/gists{/gist_id}","starred_url":"https://api.github.com/users/imandhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imandhan/subscriptions","organizations_url":"https://api.github.com/users/imandhan/orgs","repos_url":"https://api.github.com/users/imandhan/repos","events_url":"https://api.github.com/users/imandhan/events{/privacy}","received_events_url":"https://api.github.com/users/imandhan/received_events","type":"User","site_admin":false},"body":"Including an additional check to make sure that the first offset in the message set to be appended to the log is >= than the log end offset.","created_at":"2016-06-14T22:29:47Z","updated_at":"2016-06-15T17:24:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"621aa8c8525c84a1c1e0e27203dffbba2961c6fd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/1506/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/1506/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/1506/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/ed674a9b3e4b4ab5531326396ef59950a2930467","head":{"label":"imandhan:KAFKA-3755","ref":"KAFKA-3755","sha":"ed674a9b3e4b4ab5531326396ef59950a2930467","user":{"login":"imandhan","id":6530254,"avatar_url":"https://avatars.githubusercontent.com/u/6530254?v=3","gravatar_id":"","url":"https://api.github.com/users/imandhan","html_url":"https://github.com/imandhan","followers_url":"https://api.github.com/users/imandhan/followers","following_url":"https://api.github.com/users/imandhan/following{/other_user}","gists_url":"https://api.github.com/users/imandhan/gists{/gist_id}","starred_url":"https://api.github.com/users/imandhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imandhan/subscriptions","organizations_url":"https://api.github.com/users/imandhan/orgs","repos_url":"https://api.github.com/users/imandhan/repos","events_url":"https://api.github.com/users/imandhan/events{/privacy}","received_events_url":"https://api.github.com/users/imandhan/received_events","type":"User","site_admin":false},"repo":{"id":56535444,"name":"kafka","full_name":"imandhan/kafka","owner":{"login":"imandhan","id":6530254,"avatar_url":"https://avatars.githubusercontent.com/u/6530254?v=3","gravatar_id":"","url":"https://api.github.com/users/imandhan","html_url":"https://github.com/imandhan","followers_url":"https://api.github.com/users/imandhan/followers","following_url":"https://api.github.com/users/imandhan/following{/other_user}","gists_url":"https://api.github.com/users/imandhan/gists{/gist_id}","starred_url":"https://api.github.com/users/imandhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imandhan/subscriptions","organizations_url":"https://api.github.com/users/imandhan/orgs","repos_url":"https://api.github.com/users/imandhan/repos","events_url":"https://api.github.com/users/imandhan/events{/privacy}","received_events_url":"https://api.github.com/users/imandhan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/imandhan/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/imandhan/kafka","forks_url":"https://api.github.com/repos/imandhan/kafka/forks","keys_url":"https://api.github.com/repos/imandhan/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imandhan/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imandhan/kafka/teams","hooks_url":"https://api.github.com/repos/imandhan/kafka/hooks","issue_events_url":"https://api.github.com/repos/imandhan/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/imandhan/kafka/events","assignees_url":"https://api.github.com/repos/imandhan/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/imandhan/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/imandhan/kafka/tags","blobs_url":"https://api.github.com/repos/imandhan/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imandhan/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imandhan/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/imandhan/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imandhan/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/imandhan/kafka/languages","stargazers_url":"https://api.github.com/repos/imandhan/kafka/stargazers","contributors_url":"https://api.github.com/repos/imandhan/kafka/contributors","subscribers_url":"https://api.github.com/repos/imandhan/kafka/subscribers","subscription_url":"https://api.github.com/repos/imandhan/kafka/subscription","commits_url":"https://api.github.com/repos/imandhan/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/imandhan/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/imandhan/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/imandhan/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/imandhan/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/imandhan/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imandhan/kafka/merges","archive_url":"https://api.github.com/repos/imandhan/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imandhan/kafka/downloads","issues_url":"https://api.github.com/repos/imandhan/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/imandhan/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/imandhan/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/imandhan/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imandhan/kafka/labels{/name}","releases_url":"https://api.github.com/repos/imandhan/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/imandhan/kafka/deployments","created_at":"2016-04-18T19:22:24Z","updated_at":"2016-04-18T19:22:28Z","pushed_at":"2016-06-14T22:27:52Z","git_url":"git://github.com/imandhan/kafka.git","ssh_url":"git@github.com:imandhan/kafka.git","clone_url":"https://github.com/imandhan/kafka.git","svn_url":"https://github.com/imandhan/kafka","homepage":null,"size":32060,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"9ff54cb5dd99fab83533ddfdf0ed89508e5525fb","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2016-06-15T14:33:39Z","pushed_at":"2016-06-15T16:33:15Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":43801,"stargazers_count":3253,"watchers_count":3253,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1998,"mirror_url":"git://git.apache.org/kafka.git","open_issues_count":197,"forks":1998,"open_issues":197,"watchers":3253,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/1506"},"html":{"href":"https://github.com/apache/kafka/pull/1506"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/1506"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/1506/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/1506/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/1506/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/ed674a9b3e4b4ab5531326396ef59950a2930467"}}}}
{"actor":{"display_login":"imandhan"}}