diff --git a/CHANGELOG.md b/CHANGELOG.md index c8710d2..cc75fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## Unreleased + - [DOC] clarified the usage of `jdbc_validation_timeout` and `connection_retry_attempts_wait_time` settings. [#169](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/169) + ## 5.4.10 - Adds retry mechanism when checkout Derby from SVN repository [#158](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/158) - [DOC] add known limitations and settings for connection issue [#167](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/167) diff --git a/docs/filter-jdbc_streaming.asciidoc b/docs/filter-jdbc_streaming.asciidoc index 3596374..a9f4341 100644 --- a/docs/filter-jdbc_streaming.asciidoc +++ b/docs/filter-jdbc_streaming.asciidoc @@ -213,6 +213,7 @@ Validate connection before use. Connection pool configuration. How often to validate a connection (in seconds). +Validation is done only when a connection is borrowed from the pool and not done actively while lays in the pool. [id="plugins-{type}s-{plugin}-parameters"] ===== `parameters` diff --git a/docs/input-jdbc.asciidoc b/docs/input-jdbc.asciidoc index 2423217..684257e 100644 --- a/docs/input-jdbc.asciidoc +++ b/docs/input-jdbc.asciidoc @@ -294,7 +294,7 @@ Maximum number of times to try connecting to database * Value type is <> * Default value is `0.5` -Number of seconds to sleep between connection attempts +Number of seconds to sleep between connection pool creation attempts. Used only during the registration of the plugin. [id="plugins-{type}s-{plugin}-jdbc_connection_string"] ===== `jdbc_connection_string` @@ -508,7 +508,8 @@ Validate connection before use. * Default value is `3600` Connection pool configuration. -How often to validate a connection (in seconds) +How often to validate a connection (in seconds). +Validation is done only when a connection is borrowed from the pool and not done actively while lays in the pool. [id="plugins-{type}s-{plugin}-last_run_metadata_path"] ===== `last_run_metadata_path` diff --git a/lib/logstash/plugin_mixins/jdbc/jdbc.rb b/lib/logstash/plugin_mixins/jdbc/jdbc.rb index 3202ad9..1613f02 100644 --- a/lib/logstash/plugin_mixins/jdbc/jdbc.rb +++ b/lib/logstash/plugin_mixins/jdbc/jdbc.rb @@ -69,7 +69,8 @@ def setup_jdbc_config config :jdbc_validate_connection, :validate => :boolean, :default => false # Connection pool configuration. - # How often to validate a connection (in seconds) + # How often to validate a connection (in seconds). + # Validation is done only when a connection is borrowed from the pool and not done actively while lays in the pool. config :jdbc_validation_timeout, :validate => :number, :default => 3600 # Connection pool configuration. @@ -101,7 +102,7 @@ def setup_jdbc_config # Maximum number of times to try connecting to database config :connection_retry_attempts, :validate => :number, :default => 1 - # Number of seconds to sleep between connection attempts + # Number of seconds to sleep between connection pool creation attempts. Used only during the registration of the plugin. config :connection_retry_attempts_wait_time, :validate => :number, :default => 0.5 # Maximum number of times to try running statement diff --git a/lib/logstash/plugin_mixins/jdbc_streaming.rb b/lib/logstash/plugin_mixins/jdbc_streaming.rb index 8788625..3f236f7 100644 --- a/lib/logstash/plugin_mixins/jdbc_streaming.rb +++ b/lib/logstash/plugin_mixins/jdbc_streaming.rb @@ -51,7 +51,8 @@ def setup_jdbc_config config :jdbc_validate_connection, :validate => :boolean, :default => false # Connection pool configuration. - # How often to validate a connection (in seconds) + # How often to validate a connection (in seconds). + # Validation is done only when a connection is borrowed from the pool and not done actively while lays in the pool. config :jdbc_validation_timeout, :validate => :number, :default => 3600 end