Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiyv-improving committed Dec 19, 2023
1 parent 08131d3 commit 7b26b04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,13 @@ You can include additional monitoring configurations by adding the prefix `monit
## **Experimental** Enhanced Failure Monitoring Plugin v2
> [!WARNING] This plugin is experimental and users should test the plugin before using it in production environment.
> [!WARNING]
> This plugin is experimental and users should test the plugin before using it in production environment.
Enhanced Failure Monitoring Plugin v2 is an alternative implementation of enhanced failure monitoring, and it is functionally equal to the Enhanced Failure Monitoring Plugin described above. Both plugins share the same set of [configuration parameters](#enhanced-failure-monitoring-parameters). Enhanced Failure Monitoring Plugin v2 plugin is designed to be a drop-in replacement for the Enhanced Failure Monitoring Plugin.
> [!NOTE] Since these two plugins are separate plugins, users may decide to use them together with a single connection. While this should not have any negative side effects, it is not recommended. It is recommended to use either the Enhanced Failure Monitoring Plugin, or the Enhanced Failure Monitoring Plugin v2 where it's needed.
> [!NOTE]
> Since these two plugins are separate plugins, users may decide to use them together with a single connection. While this should not have any negative side effects, it is not recommended. It is recommended to use either the Enhanced Failure Monitoring Plugin, or the Enhanced Failure Monitoring Plugin v2 where it's needed.
In order to use Enhanced Failure Monitoring Plugin v2, users should add `software.aws.rds.jdbc.mysql.shading.com.mysql.cj.jdbc.ha.plugins.efm2.NodeMonitoringConnectionPluginFactory` to `connectionPluginFactories`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,27 @@ public class Monitor implements IMonitor {
private final String defaultTimeoutMillis;


// TODO: constructor javadoc params
/**
* Store the monitoring configuration for a connection.
*
* @param connectionProvider A provider for creating new connections.
* @param hostInfo The {@link HostInfo} of the server this {@link Monitor} instance is
* monitoring.
* @param propertySet The {@link PropertySet} containing additional monitoring configuration.
* @param failureDetectionTimeMillis Grace period after which node monitoring starts.
* @param failureDetectionIntervalMillis Interval between each failed connection check.
* @param failureDetectionCount Number of failed connection checks before considering
* database node as unhealthy.
* @param logger A {@link Log} implementation.
*/
public Monitor(
IConnectionProvider connectionProvider,
HostInfo hostInfo,
PropertySet propertySet,
final IConnectionProvider connectionProvider,
final HostInfo hostInfo,
final PropertySet propertySet,
final int failureDetectionTimeMillis,
final int failureDetectionIntervalMillis,
final int failureDetectionCount,
Log logger) {
final Log logger) {

this.connectionProvider = connectionProvider;
this.hostInfo = hostInfo;
Expand Down

0 comments on commit 7b26b04

Please sign in to comment.