[
https://issues.apache.org/jira/browse/CASSANDRASC-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17619134#comment-17619134
]
ASF subversion and git services commented on CASSANDRASC-44:
------------------------------------------------------------
Commit 5471b66c1e69e057bbbe75e4ffe67c1891cd9495 in cassandra-sidecar's branch
refs/heads/trunk from Francisco Guerrero
[ https://gitbox.apache.org/repos/asf?p=cassandra-sidecar.git;h=5471b66 ]
CASSANDRASC-44 Refactor health check to use vertx timer
Vertx API offers a periodic timer that integrates with it's internal thead
pooling
mechanism. In this commit, we utilize vertx's periodic timer in favor of using a
`Executors.newSingleThreadScheduledExecutor()` on each delegate.
Another benefit of this approach is that if the cluster topology changes, i.e.
node replacement, cluster expansion / shrink, then the health checks will be
performed
against the actual nodes in the cluster, assuming we receive an updated view of
the
cluster when invoking the `Configuration#getInstancesConfig()#instances()`
method.
We no longer need to worry about decommissioning the single thread executors
running
on each delegate.
patch by Francisco Guerrero; reviewed by Yifan Cai, Dinesh Joshi for
CASSANDRASC-44
> Use vertx periodicTimer for health checks
> -----------------------------------------
>
> Key: CASSANDRASC-44
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-44
> Project: Sidecar for Apache Cassandra
> Issue Type: Improvement
> Components: Rest API
> Reporter: Francisco Guerrero
> Assignee: Francisco Guerrero
> Priority: Normal
> Labels: pull-request-available
>
> Align Sidecar to vertx best practices by using vertx's periodic timer instead
> of using the {{Executors.newSingleThreadScheduledExecutor}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]