{"action":"created","comment":{"url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/comments/44362800","id":44362800,"diff_hunk":"@@ -0,0 +1,255 @@\n+# encoding: utf-8\n+require \"logstash/namespace\"\n+# require \"concurrent\"\n+require \"thread_safe\"","path":"lib/logstash/codecs/identity_map_codec.rb","position":4,"original_position":4,"commit_id":"b569534da88baec12c74a084de2fd38739a06816","original_commit_id":"b569534da88baec12c74a084de2fd38739a06816","user":{"login":"ph","id":640,"avatar_url":"https://avatars.githubusercontent.com/u/640?v=3","gravatar_id":"","url":"https://api.github.com/users/ph","html_url":"https://github.com/ph","followers_url":"https://api.github.com/users/ph/followers","following_url":"https://api.github.com/users/ph/following{/other_user}","gists_url":"https://api.github.com/users/ph/gists{/gist_id}","starred_url":"https://api.github.com/users/ph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ph/subscriptions","organizations_url":"https://api.github.com/users/ph/orgs","repos_url":"https://api.github.com/users/ph/repos","events_url":"https://api.github.com/users/ph/events{/privacy}","received_events_url":"https://api.github.com/users/ph/received_events","type":"User","site_admin":false},"body":"We will need to keep track of this, I believe this will become part of concurrent ruby 1.0","created_at":"2015-11-10T02:11:26Z","updated_at":"2015-11-10T02:11:26Z","html_url":"https://github.com/logstash-plugins/logstash-codec-multiline/pull/13#discussion_r44362800","pull_request_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/comments/44362800"},"html":{"href":"https://github.com/logstash-plugins/logstash-codec-multiline/pull/13#discussion_r44362800"},"pull_request":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/13","id":49855390,"html_url":"https://github.com/logstash-plugins/logstash-codec-multiline/pull/13","diff_url":"https://github.com/logstash-plugins/logstash-codec-multiline/pull/13.diff","patch_url":"https://github.com/logstash-plugins/logstash-codec-multiline/pull/13.patch","issue_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/issues/13","number":13,"state":"open","locked":false,"title":"Add Identity Map Codec (please read the notes to reviewers)","user":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"body":"also has tests\r\n\r\nFollows on from this closed PR on core - https://github.com/elastic/logstash/pull/4104\r\n\r\nNOTES TO REVIEWERS:\r\n- This pseudo codec is to be used along with the multiline codec in the file input initially. \r\n- When a stream identity/codec is evicted, it is also flushed using the block given to the decode method which closes over the input-filter queue.\r\n- There will always be one or more buffered lines trapped in the multiline codec because we don't flush on close on any buffered codecs. But if the stream/codec is evicted then the trapped lines will be released.\r\n\r\nIf you have read or commented on the first PR, these are the important differences:\r\n- There is only one ThreadSafe::Hash that hold both the codec and its eviction time.\r\n- EVICT_TIMEOUT is now 1 hour, read this as - if the stream/codec was last seen more than an hour ago it can be evicted from the map. This needs to be long enough to allow all the multilines to be read and short enough to ensure flushing.\r\n- MAX_IDENTITIES is now 20000\r\n- Cleaner thread only runs when the are stream/codecs mapped\r\n\r\nFixes #10","created_at":"2015-11-05T17:36:09Z","updated_at":"2015-11-10T02:11:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0caf6cb8997367c6a528858780dad7830c36105d","assignee":{"login":"suyograo","id":1595958,"avatar_url":"https://avatars.githubusercontent.com/u/1595958?v=3","gravatar_id":"","url":"https://api.github.com/users/suyograo","html_url":"https://github.com/suyograo","followers_url":"https://api.github.com/users/suyograo/followers","following_url":"https://api.github.com/users/suyograo/following{/other_user}","gists_url":"https://api.github.com/users/suyograo/gists{/gist_id}","starred_url":"https://api.github.com/users/suyograo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suyograo/subscriptions","organizations_url":"https://api.github.com/users/suyograo/orgs","repos_url":"https://api.github.com/users/suyograo/repos","events_url":"https://api.github.com/users/suyograo/events{/privacy}","received_events_url":"https://api.github.com/users/suyograo/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/13/commits","review_comments_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/13/comments","review_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/issues/13/comments","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/statuses/b569534da88baec12c74a084de2fd38739a06816","head":{"label":"guyboertje:fix/10","ref":"fix/10","sha":"b569534da88baec12c74a084de2fd38739a06816","user":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"repo":{"id":44738323,"name":"logstash-codec-multiline","full_name":"guyboertje/logstash-codec-multiline","owner":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guyboertje/logstash-codec-multiline","description":null,"fork":true,"url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline","forks_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/forks","keys_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/teams","hooks_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/hooks","issue_events_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/issues/events{/number}","events_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/events","assignees_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/assignees{/user}","branches_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/branches{/branch}","tags_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/tags","blobs_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/git/refs{/sha}","trees_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/statuses/{sha}","languages_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/languages","stargazers_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/stargazers","contributors_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/contributors","subscribers_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/subscribers","subscription_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/subscription","commits_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/commits{/sha}","git_commits_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/git/commits{/sha}","comments_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/comments{/number}","issue_comment_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/issues/comments{/number}","contents_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/contents/{+path}","compare_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/merges","archive_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/downloads","issues_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/issues{/number}","pulls_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/pulls{/number}","milestones_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/milestones{/number}","notifications_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/labels{/name}","releases_url":"https://api.github.com/repos/guyboertje/logstash-codec-multiline/releases{/id}","created_at":"2015-10-22T10:27:22Z","updated_at":"2015-10-22T10:27:23Z","pushed_at":"2015-11-05T16:48:03Z","git_url":"git://github.com/guyboertje/logstash-codec-multiline.git","ssh_url":"git@github.com:guyboertje/logstash-codec-multiline.git","clone_url":"https://github.com/guyboertje/logstash-codec-multiline.git","svn_url":"https://github.com/guyboertje/logstash-codec-multiline","homepage":null,"size":125,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"logstash-plugins:master","ref":"master","sha":"7dada4e74d256e22da194119469b02bdd50f6048","user":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","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":24636787,"name":"logstash-codec-multiline","full_name":"logstash-plugins/logstash-codec-multiline","owner":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","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-multiline","description":null,"fork":false,"url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline","forks_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/forks","keys_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/teams","hooks_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/hooks","issue_events_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/issues/events{/number}","events_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/events","assignees_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/assignees{/user}","branches_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/branches{/branch}","tags_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/tags","blobs_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/git/refs{/sha}","trees_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/statuses/{sha}","languages_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/languages","stargazers_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/stargazers","contributors_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/contributors","subscribers_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/subscribers","subscription_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/subscription","commits_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/commits{/sha}","git_commits_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/git/commits{/sha}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/comments{/number}","issue_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/issues/comments{/number}","contents_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/contents/{+path}","compare_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/merges","archive_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/downloads","issues_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/issues{/number}","pulls_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls{/number}","milestones_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/milestones{/number}","notifications_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/labels{/name}","releases_url":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/releases{/id}","created_at":"2014-09-30T12:16:04Z","updated_at":"2015-04-20T13:57:45Z","pushed_at":"2015-11-05T17:36:09Z","git_url":"git://github.com/logstash-plugins/logstash-codec-multiline.git","ssh_url":"git@github.com:logstash-plugins/logstash-codec-multiline.git","clone_url":"https://github.com/logstash-plugins/logstash-codec-multiline.git","svn_url":"https://github.com/logstash-plugins/logstash-codec-multiline","homepage":null,"size":294,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":8,"forks":6,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/13"},"html":{"href":"https://github.com/logstash-plugins/logstash-codec-multiline/pull/13"},"issue":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/issues/13"},"comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/logstash-plugins/logstash-codec-multiline/statuses/b569534da88baec12c74a084de2fd38739a06816"}}}}