{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/122652228","pull_request_review_id":44781189,"id":122652228,"diff_hunk":"@@ -0,0 +1,330 @@\n+/*\n+ * Licensed to Elasticsearch under one or more contributor\n+ * license agreements. See the NOTICE file distributed with\n+ * this work for additional information regarding copyright\n+ * ownership. Elasticsearch licenses this file to you under\n+ * the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package org.elasticsearch.transport.nio;\n+\n+import com.carrotsearch.hppc.ObjectArrayDeque;\n+import com.carrotsearch.hppc.cursors.ObjectCursor;\n+import org.apache.lucene.util.BytesRef;\n+import org.apache.lucene.util.BytesRefIterator;\n+import org.elasticsearch.common.bytes.CompositeBytesReference;\n+\n+import java.io.IOException;\n+import java.nio.ByteBuffer;\n+import java.util.Arrays;\n+\n+\n+/**\n+ * A bytes reference that is composed of multiple underlying {@link ByteBufferReference} instances.\n+ * This buffer is mutable. So additional {@link ByteBufferReference} instances can be added to the\n+ * end or dropped from the beginning dropped efficiently.\n+ *\n+ * Modifications to the reader or writer indexes of this buffer will adjust the indexes of the\n+ * underlying buffers.\n+ *\n+ * Buffers that are added to this composite buffer must maintain contiguous readable or writable\n+ * regions. For example if the composite buffer is 10 bytes long with the writer index set to 9,\n+ * any buffer added to the end must have a writer index of 0. The same principle applies to reader\n+ * indexes.\n+ */\n+public class CompositeByteBufferReference extends NetworkBytesReference {","path":"test/framework/src/main/java/org/elasticsearch/transport/nio/CompositeByteBufferReference.java","position":46,"original_position":46,"commit_id":"b9ccba5d1d7fb9d3b8e67b571db51b5db0dd2422","original_commit_id":"b9ccba5d1d7fb9d3b8e67b571db51b5db0dd2422","user":{"login":"s1monw","id":973334,"avatar_url":"https://avatars3.githubusercontent.com/u/973334?v=3","gravatar_id":"","url":"https://api.github.com/users/s1monw","html_url":"https://github.com/s1monw","followers_url":"https://api.github.com/users/s1monw/followers","following_url":"https://api.github.com/users/s1monw/following{/other_user}","gists_url":"https://api.github.com/users/s1monw/gists{/gist_id}","starred_url":"https://api.github.com/users/s1monw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s1monw/subscriptions","organizations_url":"https://api.github.com/users/s1monw/orgs","repos_url":"https://api.github.com/users/s1monw/repos","events_url":"https://api.github.com/users/s1monw/events{/privacy}","received_events_url":"https://api.github.com/users/s1monw/received_events","type":"User","site_admin":false},"body":"I left some suggestions to remove this for now. I really don't want to block all the progress on this, lets try to work with `BytesReference` only. I left some suggestions in `NioSocketChannel`","created_at":"2017-06-19T08:52:52Z","updated_at":"2017-06-19T08:54:28Z","html_url":"https://github.com/elastic/elasticsearch/pull/24262#discussion_r122652228","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/24262","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/122652228"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/24262#discussion_r122652228"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/24262"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/24262","id":117072414,"html_url":"https://github.com/elastic/elasticsearch/pull/24262","diff_url":"https://github.com/elastic/elasticsearch/pull/24262.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/24262.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/24262","number":24262,"state":"open","locked":false,"title":"Introduce NioTransport into framework for testing","user":{"login":"tbrooks8","id":862472,"avatar_url":"https://avatars0.githubusercontent.com/u/862472?v=3","gravatar_id":"","url":"https://api.github.com/users/tbrooks8","html_url":"https://github.com/tbrooks8","followers_url":"https://api.github.com/users/tbrooks8/followers","following_url":"https://api.github.com/users/tbrooks8/following{/other_user}","gists_url":"https://api.github.com/users/tbrooks8/gists{/gist_id}","starred_url":"https://api.github.com/users/tbrooks8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbrooks8/subscriptions","organizations_url":"https://api.github.com/users/tbrooks8/orgs","repos_url":"https://api.github.com/users/tbrooks8/repos","events_url":"https://api.github.com/users/tbrooks8/events{/privacy}","received_events_url":"https://api.github.com/users/tbrooks8/received_events","type":"User","site_admin":false},"body":"This commit introduces a nio based tcp transport into framework for\r\ntesting.\r\n\r\nCurrently Elasticsearch uses a simple blocking tcp transport for\r\ntesting purposes (MockTcpTransport). This diverges from production\r\nwhere our current transport (netty) is non-blocking.\r\n\r\nThe point of this commit is to introduce a testing variant that more\r\nclosely matches the behavior of production instances.","created_at":"2017-04-21T21:40:32Z","updated_at":"2017-06-19T08:54:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"077d43a921515c0ecc058819c4e1b4f784fe2492","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jasontedor","id":4744941,"avatar_url":"https://avatars0.githubusercontent.com/u/4744941?v=3","gravatar_id":"","url":"https://api.github.com/users/jasontedor","html_url":"https://github.com/jasontedor","followers_url":"https://api.github.com/users/jasontedor/followers","following_url":"https://api.github.com/users/jasontedor/following{/other_user}","gists_url":"https://api.github.com/users/jasontedor/gists{/gist_id}","starred_url":"https://api.github.com/users/jasontedor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasontedor/subscriptions","organizations_url":"https://api.github.com/users/jasontedor/orgs","repos_url":"https://api.github.com/users/jasontedor/repos","events_url":"https://api.github.com/users/jasontedor/events{/privacy}","received_events_url":"https://api.github.com/users/jasontedor/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/24262/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/24262/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/24262/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/b9ccba5d1d7fb9d3b8e67b571db51b5db0dd2422","head":{"label":"tbrooks8:squashed_nio","ref":"squashed_nio","sha":"b9ccba5d1d7fb9d3b8e67b571db51b5db0dd2422","user":{"login":"tbrooks8","id":862472,"avatar_url":"https://avatars0.githubusercontent.com/u/862472?v=3","gravatar_id":"","url":"https://api.github.com/users/tbrooks8","html_url":"https://github.com/tbrooks8","followers_url":"https://api.github.com/users/tbrooks8/followers","following_url":"https://api.github.com/users/tbrooks8/following{/other_user}","gists_url":"https://api.github.com/users/tbrooks8/gists{/gist_id}","starred_url":"https://api.github.com/users/tbrooks8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbrooks8/subscriptions","organizations_url":"https://api.github.com/users/tbrooks8/orgs","repos_url":"https://api.github.com/users/tbrooks8/repos","events_url":"https://api.github.com/users/tbrooks8/events{/privacy}","received_events_url":"https://api.github.com/users/tbrooks8/received_events","type":"User","site_admin":false},"repo":{"id":66806587,"name":"elasticsearch","full_name":"tbrooks8/elasticsearch","owner":{"login":"tbrooks8","id":862472,"avatar_url":"https://avatars0.githubusercontent.com/u/862472?v=3","gravatar_id":"","url":"https://api.github.com/users/tbrooks8","html_url":"https://github.com/tbrooks8","followers_url":"https://api.github.com/users/tbrooks8/followers","following_url":"https://api.github.com/users/tbrooks8/following{/other_user}","gists_url":"https://api.github.com/users/tbrooks8/gists{/gist_id}","starred_url":"https://api.github.com/users/tbrooks8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbrooks8/subscriptions","organizations_url":"https://api.github.com/users/tbrooks8/orgs","repos_url":"https://api.github.com/users/tbrooks8/repos","events_url":"https://api.github.com/users/tbrooks8/events{/privacy}","received_events_url":"https://api.github.com/users/tbrooks8/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tbrooks8/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/tbrooks8/elasticsearch","forks_url":"https://api.github.com/repos/tbrooks8/elasticsearch/forks","keys_url":"https://api.github.com/repos/tbrooks8/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tbrooks8/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tbrooks8/elasticsearch/teams","hooks_url":"https://api.github.com/repos/tbrooks8/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/tbrooks8/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/tbrooks8/elasticsearch/events","assignees_url":"https://api.github.com/repos/tbrooks8/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/tbrooks8/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/tbrooks8/elasticsearch/tags","blobs_url":"https://api.github.com/repos/tbrooks8/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tbrooks8/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tbrooks8/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/tbrooks8/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tbrooks8/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/tbrooks8/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/tbrooks8/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/tbrooks8/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/tbrooks8/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/tbrooks8/elasticsearch/subscription","commits_url":"https://api.github.com/repos/tbrooks8/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/tbrooks8/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/tbrooks8/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/tbrooks8/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/tbrooks8/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/tbrooks8/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tbrooks8/elasticsearch/merges","archive_url":"https://api.github.com/repos/tbrooks8/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tbrooks8/elasticsearch/downloads","issues_url":"https://api.github.com/repos/tbrooks8/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/tbrooks8/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/tbrooks8/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/tbrooks8/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tbrooks8/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/tbrooks8/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/tbrooks8/elasticsearch/deployments","created_at":"2016-08-29T03:03:10Z","updated_at":"2016-08-29T03:03:37Z","pushed_at":"2017-06-19T03:09:39Z","git_url":"git://github.com/tbrooks8/elasticsearch.git","ssh_url":"git@github.com:tbrooks8/elasticsearch.git","clone_url":"https://github.com/tbrooks8/elasticsearch.git","svn_url":"https://github.com/tbrooks8/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":341790,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"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":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"4c28e781ddcdc7489d2dec25e0a3488253bff2bf","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars3.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars3.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2017-06-19T08:49:47Z","pushed_at":"2017-06-19T08:30:12Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":352259,"stargazers_count":23270,"watchers_count":23270,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8198,"mirror_url":null,"open_issues_count":1262,"forks":8198,"open_issues":1262,"watchers":23270,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/24262"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/24262"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/24262"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/24262/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/24262/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/24262/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/b9ccba5d1d7fb9d3b8e67b571db51b5db0dd2422"}}}}
{"actor":{"display_login":"s1monw"}}