{"action":"created","issue":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-beats/issues/38","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-input-beats/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-beats/issues/38/comments","events_url":"https://api.github.com/repos/logstash-plugins/logstash-input-beats/issues/38/events","html_url":"https://github.com/logstash-plugins/logstash-input-beats/pull/38","id":124851227,"number":38,"title":"Refactoring of the plugin handling of connection","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},"labels":[],"state":"open","locked":false,"assignee":{"login":"jsvd","id":31809,"avatar_url":"https://avatars.githubusercontent.com/u/31809?v=3","gravatar_id":"","url":"https://api.github.com/users/jsvd","html_url":"https://github.com/jsvd","followers_url":"https://api.github.com/users/jsvd/followers","following_url":"https://api.github.com/users/jsvd/following{/other_user}","gists_url":"https://api.github.com/users/jsvd/gists{/gist_id}","starred_url":"https://api.github.com/users/jsvd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsvd/subscriptions","organizations_url":"https://api.github.com/users/jsvd/orgs","repos_url":"https://api.github.com/users/jsvd/repos","events_url":"https://api.github.com/users/jsvd/events{/privacy}","received_events_url":"https://api.github.com/users/jsvd/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2016-01-04T22:12:53Z","updated_at":"2016-01-06T13:47:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-beats/pulls/38","html_url":"https://github.com/logstash-plugins/logstash-input-beats/pull/38","diff_url":"https://github.com/logstash-plugins/logstash-input-beats/pull/38.diff","patch_url":"https://github.com/logstash-plugins/logstash-input-beats/pull/38.patch"},"body":"This PR introduces a few notables changes to the way the plugin is\r\nstructured.\r\n\r\n- It uses the Callback approch proposed by @guyboertje instead of using\r\n  a block.\r\n\r\n- It decouples the connection handing and the data parsing into\r\n  separates class easiy unit testable.\r\n\r\n- It uses the Java Synchronous queues instead of my homebrew version\r\nwhich had a concurrency bug under high load. (Note logstash core will\r\nalso use the same queue)\r\n\r\n- It fix an issue with incorrectly parsed date when applying the payload data to\r\n  a decoded message frame.\r\n\r\n- It had better flush handling when we shutdown logstash, codec content\r\n  will be send to the queue.\r\n\r\n- it keep track of the connections and remove them when problems\r\n  happens.\r\n\r\n- When a connection is close from the library the input plugin will be\r\n  aware of it and be able to flush the content of the codec.\r\n\r\n**Reviewer**\r\n- Missing an integration test for the multiline case, working on that.\r\n- @guyboertje Can you take a look at the codec/flush/callback code?\r\n- Real world test would be appreciated :heart: \r\n\r\nFixes: #37 "},"comment":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-beats/issues/comments/169326613","html_url":"https://github.com/logstash-plugins/logstash-input-beats/pull/38#issuecomment-169326613","issue_url":"https://api.github.com/repos/logstash-plugins/logstash-input-beats/issues/38","id":169326613,"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},"created_at":"2016-01-06T13:47:46Z","updated_at":"2016-01-06T13:47:46Z","body":"> Beats input: unhandled exception {:exception=>#<ConcurrencyError: interrupted waiting for mutex: null>, :backtrace=>[\"org/jruby/ext/thread/Mutex.java:94:in `lock'\", \"org/jruby/ext/thread/Mutex.java:147:in `synchronize'\", \"/Users/joaoduarte/projects/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-lumberjack-2.0.5/lib/logstash/circuit_breaker.rb:89:in `state'\", \"/Users/joaoduarte/projects/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-lumberjack-2.0.5/lib/logstash/circuit_breaker.rb:47:in `execute'\", \"/Users/joaoduarte/new_plugins/logstash-input-beats/lib/logstash/inputs/beats.rb:177:in `handle_new_connection'\", \"/Users/joaoduarte/new_plugins/logstash-input-beats/lib/logstash/inputs/beats.rb:130:in `run'\", \"org/jruby/RubyProc.java:281:in `call'\", \"/Users/joaoduarte/projects/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/executor/executor_service.rb:515:in `run'\", \"Concurrent$$JavaExecutorService$$Job_290572464.gen:13:in `run'\"], :level=>:error}\r\n\r\nI will check this exection, nothing was changed for that part of the code."}}