{"action":"opened","number":13,"pull_request":{"url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/pulls/13","id":157888736,"html_url":"https://github.com/logstash-plugins/logstash-codec-line/pull/13","diff_url":"https://github.com/logstash-plugins/logstash-codec-line/pull/13.diff","patch_url":"https://github.com/logstash-plugins/logstash-codec-line/pull/13.patch","issue_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/issues/13","number":13,"state":"open","locked":false,"title":"add thread safety around the BufferedTokenizer usage","user":{"login":"colinsurprenant","id":2010,"avatar_url":"https://avatars1.githubusercontent.com/u/2010?v=4","gravatar_id":"","url":"https://api.github.com/users/colinsurprenant","html_url":"https://github.com/colinsurprenant","followers_url":"https://api.github.com/users/colinsurprenant/followers","following_url":"https://api.github.com/users/colinsurprenant/following{/other_user}","gists_url":"https://api.github.com/users/colinsurprenant/gists{/gist_id}","starred_url":"https://api.github.com/users/colinsurprenant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinsurprenant/subscriptions","organizations_url":"https://api.github.com/users/colinsurprenant/orgs","repos_url":"https://api.github.com/users/colinsurprenant/repos","events_url":"https://api.github.com/users/colinsurprenant/events{/privacy}","received_events_url":"https://api.github.com/users/colinsurprenant/received_events","type":"User","site_admin":false},"body":"Fixes #4 \r\nRelated to elastic/logstash/issues/8830\r\n\r\nThis PR adds thread safety around the `BufferedTokenizer` usage. This codec when used in multiple thread, for example in the udp input plugin with multiple workers,  was crashing because of the thread unsafe handling of the `BufferedTokenizer`.\r\n\r\n- This has been tested & validated manually. Using this I was able to easily reproduce the problem and asses that it was solved.\r\n```\r\n bin/logstash -e 'input { udp { codec => line  workers => 4 port => 5015  } } output { stdout { codec => dots } }'\r\n```\r\n```\r\nyes \"The quick brown fox jumps over the lazy dog\" | nc -u localhost 5015\r\n```\r\n\r\n- I verified the performance impact and there is no noticeable impact when running in a single thread with or without the fix and there is a performance **increase** with the fix when using multiple thread since without the fix, threads were dying one by one until a single one remained. \r\n","created_at":"2017-12-12T17:18:59Z","updated_at":"2017-12-12T17:18:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/pulls/13/commits","review_comments_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/pulls/13/comments","review_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/pulls/comments{/number}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/issues/13/comments","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/statuses/3f887fb4229e73d77ead70c1aa79947451f7312e","head":{"label":"colinsurprenant:fix/thread_safety","ref":"fix/thread_safety","sha":"3f887fb4229e73d77ead70c1aa79947451f7312e","user":{"login":"colinsurprenant","id":2010,"avatar_url":"https://avatars1.githubusercontent.com/u/2010?v=4","gravatar_id":"","url":"https://api.github.com/users/colinsurprenant","html_url":"https://github.com/colinsurprenant","followers_url":"https://api.github.com/users/colinsurprenant/followers","following_url":"https://api.github.com/users/colinsurprenant/following{/other_user}","gists_url":"https://api.github.com/users/colinsurprenant/gists{/gist_id}","starred_url":"https://api.github.com/users/colinsurprenant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinsurprenant/subscriptions","organizations_url":"https://api.github.com/users/colinsurprenant/orgs","repos_url":"https://api.github.com/users/colinsurprenant/repos","events_url":"https://api.github.com/users/colinsurprenant/events{/privacy}","received_events_url":"https://api.github.com/users/colinsurprenant/received_events","type":"User","site_admin":false},"repo":{"id":114017354,"name":"logstash-codec-line","full_name":"colinsurprenant/logstash-codec-line","owner":{"login":"colinsurprenant","id":2010,"avatar_url":"https://avatars1.githubusercontent.com/u/2010?v=4","gravatar_id":"","url":"https://api.github.com/users/colinsurprenant","html_url":"https://github.com/colinsurprenant","followers_url":"https://api.github.com/users/colinsurprenant/followers","following_url":"https://api.github.com/users/colinsurprenant/following{/other_user}","gists_url":"https://api.github.com/users/colinsurprenant/gists{/gist_id}","starred_url":"https://api.github.com/users/colinsurprenant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinsurprenant/subscriptions","organizations_url":"https://api.github.com/users/colinsurprenant/orgs","repos_url":"https://api.github.com/users/colinsurprenant/repos","events_url":"https://api.github.com/users/colinsurprenant/events{/privacy}","received_events_url":"https://api.github.com/users/colinsurprenant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/colinsurprenant/logstash-codec-line","description":null,"fork":true,"url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line","forks_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/forks","keys_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/keys{/key_id}","collaborators_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/teams","hooks_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/hooks","issue_events_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/issues/events{/number}","events_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/events","assignees_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/assignees{/user}","branches_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/branches{/branch}","tags_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/tags","blobs_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/git/refs{/sha}","trees_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/git/trees{/sha}","statuses_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/statuses/{sha}","languages_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/languages","stargazers_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/stargazers","contributors_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/contributors","subscribers_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/subscribers","subscription_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/subscription","commits_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/commits{/sha}","git_commits_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/git/commits{/sha}","comments_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/comments{/number}","issue_comment_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/issues/comments{/number}","contents_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/contents/{+path}","compare_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/compare/{base}...{head}","merges_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/merges","archive_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/downloads","issues_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/issues{/number}","pulls_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/pulls{/number}","milestones_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/milestones{/number}","notifications_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/labels{/name}","releases_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/releases{/id}","deployments_url":"https://api.github.com/repos/colinsurprenant/logstash-codec-line/deployments","created_at":"2017-12-12T17:07:00Z","updated_at":"2017-12-12T17:07:02Z","pushed_at":"2017-12-12T17:09:07Z","git_url":"git://github.com/colinsurprenant/logstash-codec-line.git","ssh_url":"git@github.com:colinsurprenant/logstash-codec-line.git","clone_url":"https://github.com/colinsurprenant/logstash-codec-line.git","svn_url":"https://github.com/colinsurprenant/logstash-codec-line","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"logstash-plugins:master","ref":"master","sha":"0c652c77eb81d9aa77a3f64ca90a2ff9d22c3fb2","user":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars1.githubusercontent.com/u/8961934?v=4","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":24636783,"name":"logstash-codec-line","full_name":"logstash-plugins/logstash-codec-line","owner":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars1.githubusercontent.com/u/8961934?v=4","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/logstash-plugins/logstash-codec-line","description":null,"fork":false,"url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line","forks_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/forks","keys_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/teams","hooks_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/hooks","issue_events_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/issues/events{/number}","events_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/events","assignees_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/assignees{/user}","branches_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/branches{/branch}","tags_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/tags","blobs_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/git/refs{/sha}","trees_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/statuses/{sha}","languages_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/languages","stargazers_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/stargazers","contributors_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/contributors","subscribers_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/subscribers","subscription_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/subscription","commits_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/commits{/sha}","git_commits_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/git/commits{/sha}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/comments{/number}","issue_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/issues/comments{/number}","contents_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/contents/{+path}","compare_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/merges","archive_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/downloads","issues_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/issues{/number}","pulls_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/pulls{/number}","milestones_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/milestones{/number}","notifications_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/labels{/name}","releases_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/releases{/id}","deployments_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/deployments","created_at":"2014-09-30T12:16:01Z","updated_at":"2017-02-02T01:30:29Z","pushed_at":"2017-11-07T11:48:40Z","git_url":"git://github.com/logstash-plugins/logstash-codec-line.git","ssh_url":"git@github.com:logstash-plugins/logstash-codec-line.git","clone_url":"https://github.com/logstash-plugins/logstash-codec-line.git","svn_url":"https://github.com/logstash-plugins/logstash-codec-line","homepage":null,"size":39,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":7,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/pulls/13"},"html":{"href":"https://github.com/logstash-plugins/logstash-codec-line/pull/13"},"issue":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/issues/13"},"comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-line/statuses/3f887fb4229e73d77ead70c1aa79947451f7312e"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":5,"deletions":4,"changed_files":1}}
{"actor":{"display_login":"colinsurprenant"}}