logstash-plugins / logstash-input-jdbc

Logstash Plugin for JDBC Inputs
Apache License 2.0
449 stars 187 forks source link

Fix saving pipeline state using record_last_run setting #374

Open palin opened 4 years ago

palin commented 4 years ago

This fixes the issue with clean run: https://github.com/logstash-plugins/logstash-input-jdbc/issues/373

The state should not be written if the record_last_run setting is false.

marius-mcp commented 7 months ago

https://github.com/logstash-plugins/logstash-integration-jdbc/issues/121#issuecomment-2042584611

clean_run => true record_last_run => true last_run_metadata_path => "/..." seems to be the solution and that is why this was not merged.

s137 commented 7 months ago

Why is this not merged? The issue persists to this day... We applied the patch manually and it works...

I don't think this patch will be merged here, because the plugin is now part of the jdbc-integration-plugin in this repository, where I created the same issue, when I stumbled upon it, but the solution is of course the same regardless.

Honestly I just made another jdbc-input which uses a separate query without :sql_last_value to work around it. It's not ideal, but it does the job.

marius-mcp commented 7 months ago

@s137 commented also there. See my previous message from here for the link.

Update https://github.com/logstash-plugins/logstash-integration-jdbc/issues/121#issuecomment-2045396133