From 666fcfffc1539167c4fcb01881ebf4023954dc22 Mon Sep 17 00:00:00 2001 From: andsel Date: Fri, 17 May 2024 14:23:58 +0200 Subject: [PATCH 1/2] [Doc] clarified the usage of and settings --- CHANGELOG.md | 3 +++ docs/filter-jdbc_streaming.asciidoc | 1 + docs/input-jdbc.asciidoc | 5 +++-- lib/logstash/plugin_mixins/jdbc/jdbc.rb | 5 +++-- lib/logstash/plugin_mixins/jdbc_streaming.rb | 3 ++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8710d2..fcb1de5 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. + ## 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 From 9548f73ed317139b37cac92007d7fddac731495b Mon Sep 17 00:00:00 2001 From: andsel Date: Fri, 17 May 2024 14:28:48 +0200 Subject: [PATCH 2/2] Fixed changelog link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb1de5..cc75fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## Unreleased - - [DOC] clarified the usage of `jdbc_validation_timeout`and `connection_retry_attempts_wait_time` settings. + - [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)