emqx/scripts
Thales Macedo Garitezi 10425eb925 feat(resource): deprecate auto_restart_interval in favor of health_check_interval
See:
https://emqx.atlassian.net/wiki/spaces/P/pages/612368639/open+e5.1+remove+auto+restart+interval+from+buffer+worker+resource+options

Current problem:

In 5.0.x, we have two timer options that control the state changing of buffer worker
resources: auto_restart_interval and health_check_interval.

- auto_restart_interval controls how often the resource attempts to transition from
disconnected to connected.

- health_check_interval controls how often the resource is checked and potentially moved
from connected to disconnected or connecting.

The existence of two independent timers for very similar purposes is confusing to users,
QA and even developers.  Also, an intimately related configuration is request_timeout,
which can interact badly with auto_restart_interval if the latter is poorly configured:
requests may always expire if request_timeout < auto_restart_interval and if the resource
enters the disconnected state.  For health_check_interval, we attempt to derive a sane
default that gives requests a chance to retry (if request timeout is finite, then the
resource retries requests with a period of min(health_check_interval, request_timeout /
3).

Another problem with the separate auto_restart_interval is that its default value (60 s)
is too high when compared to the default request timeout and health check, leading to the
problems described above if not tuned.

Proposed solution:

We propose to drop auto_restart_interval in favor of health_check_interval, which will be
used for both disconnected -> connected and connected -> {disconnected, connecting}
transition checks.  With that, the resource will attempt to reconnect at the same interval
as the health check, which currently is 15 s.

Also, as two smaller changes to accompany this one:

- Increase the default request_timeout from 15 s to 45 s.
- Rename request_timeout to request_ttl.
2023-06-01 11:20:06 -03:00
..
conf-test test(conf-test): use major version number as prefix to find old config 2023-05-30 09:59:57 +02:00
ct Merge branch 'release-50' into file-transfer 2023-05-09 23:30:22 +05:00
rel build: remove changelog base compare 2023-05-30 09:32:42 +02:00
relup-build ci: no relup for now 2023-02-03 09:40:28 +01:00
relup-test ci: update emqx-builders with OTP 24.3.4.2-3 and 25.1.2-3 2023-03-23 11:59:43 +02:00
spellcheck docs: fix spellcheck for telemetry app 2023-05-26 08:44:19 +02:00
test feat(resource): deprecate auto_restart_interval in favor of health_check_interval 2023-06-01 11:20:06 -03:00
apps-version-check.sh refactor: delete emqx_statsd all together 2023-05-26 15:17:42 +02:00
buildx.sh ci(buildx): use a special builder value to indicate host build 2023-05-05 22:20:34 +02:00
check-deps-integrity.escript feat(license): add license application 2022-02-07 19:05:47 +03:00
check-elixir-applications.exs refactor: stop releasing edge edition 2022-05-26 20:05:46 +02:00
check-elixir-deps-discrepancies.exs feat: add RabbitMQ bridge 2023-05-09 14:32:26 +02:00
check-elixir-emqx-machine-boot-discrepancies.exs fix(mix): include node_dump in tgz and packages 2022-02-07 18:15:17 -03:00
check-format.sh chore: delete per-app format scripts 2022-05-11 09:15:32 +02:00
check-i18n-style.escript refactor: update i18n style check script to work with new layout 2023-04-17 13:36:10 +02:00
check-i18n-style.sh docs: fix i18n desc style 2023-04-03 13:12:24 +02:00
check-nl-at-eof.sh chore: ignore chekcing nl-at-eof for *.jks files 2023-03-20 09:55:25 +08:00
elvis-check.sh fix: avoid stray \ warning for grep 3.8+ 2023-05-06 12:42:53 +08:00
ensure-rebar3.sh chore: switch to emqx/rebar3 3.19.0-emqx-1 2022-12-16 13:45:04 +03:00
erlfmt chore: add a pre-commit hook to auto format erlang code 2022-04-27 08:01:55 +02:00
find-apps.sh chore: add README for OpenTSDB bridge 2023-04-23 11:22:48 +08:00
find-prev-rel-tag.sh build: add a script to find previous release version tag 2023-03-09 18:34:26 +01:00
find-props.sh fix(ci): fix shellcheck file pattern 2022-01-05 11:34:04 -03:00
find-suites.sh feat: Add Kafka connector 2022-09-13 19:46:56 +02:00
gen-erlang-ls-config.sh ci: Add a script to generate erlang_ls config 2023-04-25 15:48:22 +02:00
get-dashboard.sh chore(dashboard): change dashboard repo 2023-03-22 12:57:44 +08:00
get-distro.sh chore: fix distro detection for amazon linux 2 2022-12-14 19:09:14 +01:00
get-elixir-vsn.sh fix(elixir): guard against missing elixir installation 2022-01-26 16:59:50 -03:00
get-otp-vsn.sh fix: portable shebang 2021-12-27 15:45:12 +01:00
git-hook-post-commit.sh chore: add git commit hook for git-blame-ignore-revs 2022-09-23 12:37:07 +08:00
git-hook-pre-commit.sh chore(git-hook): don't fail commit hook when no mix 2023-05-05 11:02:58 +02:00
git-hook-pre-push.sh refactor: no more EMQX_ENTERPRISE compile flag 2021-11-20 20:41:06 +01:00
git-hooks-init.sh chore: add git commit hook for git-blame-ignore-revs 2022-09-23 12:37:07 +08:00
install-msodbc-driver.sh fix: refine default sql and driver name for mssql bridge 2023-04-23 15:47:18 +08:00
macos-sign-binaries.sh build(macos): do not automatically lock keychain 2022-12-27 09:08:57 +01:00
make-docker-image-from-host-build.sh test: add a script to test dns cluster node discovery 2022-06-16 01:34:16 +02:00
merge-config.escript build: download zh translation from emqx-i18n.git 2023-05-29 14:22:23 +02:00
pkg-tests.sh ci: test docker images and packages in the same way 2023-02-17 17:42:46 +01:00
pre-compile.sh build: download zh translation from emqx-i18n.git 2023-05-29 14:22:23 +02:00
prepare-build-deps.sh fix: mac build required pkg coreutils 2022-06-16 18:49:42 +08:00
rerun-failed-checks.py ci(gree-master): handle pagination 2023-03-21 11:22:59 +01:00
shellcheck.sh fix(ci): fix shellcheck file pattern 2022-01-05 11:34:04 -03:00
test-node-discovery-dns.sh chore: supprot DNS discovery test for 4.x 2022-09-28 21:31:18 +02:00
update_appup.escript fix(prometheus): Disable authorization for metrics scraping endpoint 2022-06-23 00:31:53 +02:00
update-appup.sh build: add a script to find previous release version tag 2023-03-09 18:34:26 +01:00
update-bom.sh feat(bom): import rebar_sbom for generating bom files 2022-12-30 00:00:14 +08:00
update-copyright-years.sh docs: fix typos 2022-01-27 12:29:38 +01:00