{"action":"closed","issue":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-jdbc/issues/212","repository_url":"https://api.github.com/repos/logstash-plugins/logstash-input-jdbc","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-input-jdbc/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-jdbc/issues/212/comments","events_url":"https://api.github.com/repos/logstash-plugins/logstash-input-jdbc/issues/212/events","html_url":"https://github.com/logstash-plugins/logstash-input-jdbc/issues/212","id":232286968,"number":212,"title":"Plugin grabbing same data over and over again even with  \"use_column_value => true\"","user":{"login":"oculushut","id":10579045,"avatar_url":"https://avatars0.githubusercontent.com/u/10579045?v=3","gravatar_id":"","url":"https://api.github.com/users/oculushut","html_url":"https://github.com/oculushut","followers_url":"https://api.github.com/users/oculushut/followers","following_url":"https://api.github.com/users/oculushut/following{/other_user}","gists_url":"https://api.github.com/users/oculushut/gists{/gist_id}","starred_url":"https://api.github.com/users/oculushut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oculushut/subscriptions","organizations_url":"https://api.github.com/users/oculushut/orgs","repos_url":"https://api.github.com/users/oculushut/repos","events_url":"https://api.github.com/users/oculushut/events{/privacy}","received_events_url":"https://api.github.com/users/oculushut/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-30T15:13:39Z","updated_at":"2017-05-30T16:11:12Z","closed_at":"2017-05-30T16:11:12Z","body":"- Version: LogStash 5.4.0/logstash-input-jdbc (4.1.3)\r\n\r\n- Operating System: CentOS 7 (Linux version 3.10.0-514.16.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Apr 12 15:04:24 UTC 2017)\r\n\r\n- Config File (if you have sensitive info, please remove it):\r\n\r\n```\r\ninput {\r\n  jdbc {\r\n    jdbc_driver_library => \"/u01/app/oracle/product/11.2.0/xe/jdbc/lib/ojdbc5.jar\"\r\n    jdbc_driver_class => \"Java::oracle.jdbc.driver.OracleDriver\"\r\n    jdbc_connection_string => \"jdbc:oracle:thin:@localhost.localdomain:1521/XE\"\r\n    jdbc_user => \"xxx\"\r\n    jdbc_password => \"xxx\"\r\n    schedule => \"* * * * *\"\r\n    statement => \"SELECT * from system.stuff\"\r\n    use_column_value => true\r\n    tracking_column => unique_stuff_id\r\n    tracking_column_type => \"numeric\"\r\n    last_run_metadata_path => \"/home/xxx/logstash_data/last_number\"\r\n  }\r\n}\r\n\r\noutput {\r\n    elasticsearch {\r\n        hosts => [ \"localhost:9200\" ]\r\n    }\r\n}\r\n```\r\n\r\n- Sample Data:\r\n\r\nOracle contains a table called **system.stuff**.\r\n\r\nThis contains a field called **unique_stuff_id** that automatically increments each time there is a new record.\r\n\r\nlast_number file is created in location specified in **last_run_metadata_path** -> 1100723\r\n\r\nThis does not change (as expected since I do not add any new data to the table).\r\n\r\n- Steps to Reproduce:\r\n\r\nPlugin code runs several times:\r\n\r\n```\r\n15:44:00.265 [Ruby-0-Thread-18: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:283] INFO  logstash.inputs.jdbc - (0.001000s) SELECT * from system.stuff\r\n15:45:00.147 [Ruby-0-Thread-18: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:283] INFO  logstash.inputs.jdbc - (0.002000s) SELECT * from system.stuff\r\n15:46:00.054 [Ruby-0-Thread-18: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:283] INFO  logstash.inputs.jdbc - (0.001000s) SELECT * from system.stuff\r\n15:47:00.212 [Ruby-0-Thread-18: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:283] INFO  logstash.inputs.jdbc - (0.001000s) SELECT * from system.stuff\r\n15:48:00.125 [Ruby-0-Thread-18: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:283] INFO  logstash.inputs.jdbc - (0.001000s) SELECT * from system.stuff\r\n15:49:00.022 [Ruby-0-Thread-18: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:283] INFO  logstash.inputs.jdbc - (0.001000s) SELECT * from system.stuff\r\n```\r\nI expect that the plugin will not grab new data after the first run since the tracking_column (=> unique_stuff_id)'s highest number has remained the same...  However, the plugin keeps on grabbing the same data over and over again - just grabbing everything from the table.\r\n\r\nIs this what I should expect?  Any tips?"}}
{"actor":{"display_login":"oculushut"}}