Commit Graph

703 Commits

Author SHA1 Message Date
某文
c27d844244 feat: improve authz/bridge/rule_engine/schema_registry config update 2023-06-01 23:20:56 +08:00
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
Paulo Zulato
3a6ad3b049 fix(oracle): require either sid or service name
Fixes https://emqx.atlassian.net/browse/EMQX-9980
2023-05-31 17:18:45 -03:00
Thales Macedo Garitezi
77c9eda036 test: rm stray clear_screen calls 2023-05-31 11:07:44 -03:00
Zhongwen Deng
4a2c7e48a5 chore: update license app.src version 2023-05-31 09:28:10 +08:00
zhongwencool
f97ed9bab9
Merge branch 'master' into licence-conf-update 2023-05-31 08:19:33 +08:00
Thales Macedo Garitezi
04bd39861d chore: bump app vsns 2023-05-30 11:08:20 -03:00
Thales Macedo Garitezi
9c3f838e14
Merge pull request #10841 from thalesmg/kafka-validate-key-v50
feat({kafka,pulsar}_producer): add validation for empty message key when strategy = key_dispatch
2023-05-30 09:37:15 -03:00
某文
f4549d280b test: earse license after cli ct test 2023-05-29 22:01:46 +08:00
Thales Macedo Garitezi
3edbad9f56 feat(pulsar_producer): add validation for empty message key when strategy = key_dispatch 2023-05-29 10:04:19 -03:00
Zaiming (Stone) Shi
d014b80834 build: download zh translation from emqx-i18n.git 2023-05-29 14:22:23 +02:00
Zhongwen Deng
e065904583 test: add license cli test 2023-05-29 18:19:59 +08:00
某文
2d2062e504 feat: support emqx_conf:update([license],Conf) 2023-05-29 18:17:57 +08:00
Zaiming (Stone) Shi
36e268c933 chore: bump app versions 2023-05-26 16:05:37 +02:00
Zaiming (Stone) Shi
a0d4120f8c
Merge pull request #10807 from zmstone/0524-delete-license-installer
0524 delete license installer
2023-05-24 21:01:51 +02:00
Thales Macedo Garitezi
324459990f Merge branch 'release-50' into merge-r50-into-v50-20230524 2023-05-24 12:54:15 -03:00
Zaiming (Stone) Shi
adf71b905e chore: bump emqx_license app vsn 2023-05-24 15:10:15 +02:00
Thales Macedo Garitezi
6c414ab991 fix(schema_registry): ensure schema_encode output in rule engine is a binary (r5.0)
Fixes https://emqx.atlassian.net/browse/EMQX-9981
2023-05-24 09:13:38 -03:00
Zaiming (Stone) Shi
798fa8c2c2 refactor: delete module emqx_license_installer
after the previous refactoring, emqx_license app is now restarted
after join/rejoin the cluster, so there is no longer a need for the
installer process which monitors the 'emqx' name registration changes
and then issue license reloading and hook re-adding etc.
2023-05-24 10:55:16 +02:00
Zaiming (Stone) Shi
492a591298 refactor: do not emit debug logs on periodic license checks 2023-05-24 10:53:16 +02:00
Zaiming (Stone) Shi
732a7be187 Merge remote-tracking branch 'origin/release-50' 2023-05-22 17:46:54 +02:00
Zaiming (Stone) Shi
40e8d5d039 refactor: rename lib-ee/emqx_ee_conf to apps/emqx_enterprise 2023-05-22 14:51:27 +02:00
Zaiming (Stone) Shi
3482c2c849 refactor: redefine default value for 'node.applications' in enterprise 2023-05-22 14:51:26 +02:00
William Yang
e824e1db39
Merge pull request #10698 from qzhuyan/perf/william/force-atom-conf-path
perf(config): enforcing atom key  path in hotcode path
2023-05-22 09:38:09 +02:00
Andrew Mayorov
9aaa0b6fe1
Merge pull request #9927 from emqx/file-transfer
feat: implement file transfer over mqtt
2023-05-19 18:35:13 +03:00
Thales Macedo Garitezi
5d5c16a56d feat(bridges): use union member selector function for better error messages 2023-05-17 17:57:29 -03:00
Thales Macedo Garitezi
f83f9a2d79 chore: bump app vsns 2023-05-17 14:56:11 -03:00
Kjell Winblad
bce43978a2 refactor: the clickhouse bridge to use the new bridge app structure
Fixes:
https://emqx.atlassian.net/browse/EMQX-9538
2023-05-17 10:12:43 +02:00
Ilya Averyanov
b71955e368 fix(ft): bump application versions 2023-05-17 00:29:15 +03:00
Ilya Averyanov
1a8cf0e392 Merge branch 'release-50' into file-transfer
* release-50:
  fix(pulsar): use a binary duration as default `health_check_interval`
  docs: add changelog entry
  docs: clarify description of bridge username and password
  chore: bump to v5.0.25
  fix(limiter): adjust type for compatibility
  fix(limiter): fix that update node-level limiter config will not working
  chore: upgrade dashboard to v1.2.4-1 for ce
  chore: upgarde rulesql to 0.1.6 to fix invaid utf8 input
  chore: add changelog for 10659
  fix: crash when sysmon.os.mem_check_interval = disabled
  chore: bump influxdb version && update changes
  refactor(influxdb): move influxdb bridge into its own app
  chore: add listener default changelog
  fix: ocsp cache SUITE failed
  fix: ensure atom key for emqx_config:get
  fix: only fill cerf_file default in server side
  fix: authn init is empty
  fix: bad listeners default ssl_options
2023-05-17 00:27:55 +03:00
William Yang
1c746ed289 perf(config): enforcing atom key path in hotcode path 2023-05-16 09:57:04 +02:00
firest
6497bcae46 refactor(influxdb): move influxdb bridge into its own app 2023-05-12 11:48:49 +08:00
Ilya Averyanov
5b5d7ceac5 Merge branch 'release-50' into file-transfer
* release-50:
  fix(limiter): fix an error when setting `max_conn_rate` in a listener
  chore: bump erlcloud dependencies vsns
  chore: rename dynamo template files
  refactor(dynamo): move dynamo bridge into its own app
  chore: update changes && bump app versions
  fix: issues with the RabbitMQ config
  refactor(pgsql): move pgsql && matrix && timescale bridges into their own app
  fix: the iotdb password field so it has the password format
  chore: update changes
  refactor(tdengine): move tdengine bridge into its own app
  feat: deprecate listeners's authn http api
2023-05-11 16:15:38 +05:00
JimMoen
fbd516d740
Merge pull request #10622 from JimMoen/refactor-dynamo-bridge
refactor(dynamo): move dynamo bridge into its own app
2023-05-11 11:00:50 +08:00
JimMoen
e32ab10d01
chore: rename dynamo template files 2023-05-10 18:49:21 +08:00
JimMoen
8914e006c2
refactor(dynamo): move dynamo bridge into its own app 2023-05-10 18:49:21 +08:00
firest
066ed5c6ec refactor(pgsql): move pgsql && matrix && timescale bridges into their own app 2023-05-10 16:51:33 +08:00
firest
0f979b3d24 refactor(tdengine): move tdengine bridge into its own app 2023-05-10 14:12:57 +08:00
Ilya Averyanov
7fa166f034 Merge branch 'release-50' into file-transfer
* release-50: (73 commits)
  feat: add RabbitMQ bridge
  docs: improve rule engine labels and descriptions
  chore: bump version && update changes
  refactor(rocketmq): move rocketmq bridge into its own app
  test: dashboard_listener_test crash
  chore: bump chart versions
  chore: bump ee version to e5.0.4-alpha.1
  test: fix inter-suite flakiness
  build: compatibility to make 4.4+
  feat: add IotDB bridge
  ci: ensure git safe dir in build_packages
  ci: ensure git safe dir
  test: check_oom's max_mailbox_size
  feat: rename max_message_queue_len to max_mailbox_size
  fix(buffer_worker): fix inflight count when updating inflight item
  chore: prepare for v5.0.25-rc.1 release
  docs: add change log entry
  fix: non_neg_integer() translated to minimum = 1 in bridge-api-en.json
  chore: `MQTT X` -> `MQTTX`
  chore: make sure brod_gssapi app is included in relese package
  ...
2023-05-09 23:30:22 +05:00
Kjell Winblad
70cf1533db feat: add RabbitMQ bridge 2023-05-09 14:32:26 +02:00
firest
a119100a0e refactor(rocketmq): move rocketmq bridge into its own app 2023-05-09 15:57:56 +08:00
Thales Macedo Garitezi
270059f0c2
Merge pull request #10642 from thalesmg/fix-flaky-test-rule-engine-stop-v50
test: fix inter-suite flakiness
2023-05-08 15:37:26 -03:00
Stefan Strigler
1ade7ce9a3
Merge pull request #10560 from sstrigler/EMQX-8390-5-0-x-io-tdb-bridge-port-conf-and-api-to-5-0
IoTDB Bridge
2023-05-08 20:27:01 +02:00
Thales Macedo Garitezi
2667f06820 test: fix inter-suite flakiness 2023-05-08 13:33:46 -03:00
Stefan Strigler
d231e708cb feat: add IotDB bridge 2023-05-08 16:19:01 +02:00
Zhongwen Deng
4f396a36a9 Merge remote-tracking branch 'upstream/master' into release-50 2023-05-08 14:58:03 +08:00
JimMoen
d5dce771bd
refactor(sqlserver): move sqlserver bridge into its own app 2023-05-06 10:22:05 +08:00
Ilya Averyanov
dd3471bc22 Merge branch 'master' into file-transfer
* master: (194 commits)
  fix(limiter): update change && fix deprecated version
  chore: update changes
  perf(limiter): simplify the memory represent of limiter configuration
  ci(perf test): update tf variable name and set job timeout
  ci: fix artifact name in scheduled packages workflow
  fix: build_packages_cron.yaml workflow
  ci: move scheduled builds to a separate workflow
  build: check mnesia compatibility when generating mria config
  docs: fix a typo in api doc description
  feat(./dev): use command style and added 'ctl' command
  test: fix delayed-pubish test case flakyness
  refactor: remove raw_with_default config load option
  chore: add changelog for trace timestrap
  feat: increase the time precision of trace logs to microseconds
  chore: make sure topic_metrics/rewrite's default is []
  docs: Update changes/ce/perf-10417.en.md
  chore: bump `snabbkaffe` to 1.0.8
  ci: run static checks in separate jobs
  chore(schema): mark deprecated quic listener fields ?IMPORTANCE_HIDDEN
  chore: remove unused mqtt cap 'subscription_identifiers'
  ...
2023-05-05 16:50:18 +03:00
firest
518b6e1211 fix(tdengine): redact the password for the TDEngine example API 2023-05-05 13:51:38 +08:00
Zhongwen Deng
a4bb865e6a feat: add validations for emqx_ee_conf_schema 2023-05-04 16:53:03 +08:00
firest
277deee616 fix: add new sensitive keywords to redact checklist 2023-05-04 16:32:32 +08:00
Thales Macedo Garitezi
8aa7c014e7 perf(buffer_worker): avoid calling ets:info/2
(Almost?) fixes https://emqx.atlassian.net/browse/EMQX-9637

During the course of performance tests comparing the performance of
e5.0.3 and e4.4.16 regarding the webhook bridge in sync mode, we
observed that the throughput in e5.0.3 (sync) was much lower than in
e4.4.16: ~ 9 k msgs / s vs. ~ 50 k msgs / s, respectively.

Analyzing `observer_cli` output, we noticed that a lot of the time
both buffer workers and ehttpc processes was spent in `ets:info/2`.
That function was called to check the size of the inflight table when
updating metrics and checking if the inflight table was full.  Other
uses of `ets:info/2` were contained inside the arguments to some
`?tp/2` macro usages (https://github.com/kafka4beam/snabbkaffe/pull/60).

By using a specific record to track the size of the table, we managed
to improve the bridge performance to ~ 45 k msgs / s in sync mode.
2023-05-02 17:05:32 -03:00
Zaiming (Stone) Shi
a4bc15cfa1 Merge remote-tracking branch 'origin/master' into 0502-merge-release-50-back-to-master 2023-05-02 18:59:31 +02:00
Zaiming (Stone) Shi
d5f5f35787 Merge remote-tracking branch 'origin/release-50' into 0502-merge-release-50-back-to-master 2023-05-02 18:08:04 +02:00
Andrew Mayorov
90cf1ade74
chore: bump application versions
* emqx_connector 0.1.22
* emqx_bridge_gcp_pubsub 0.1.1
* emqx_bridge_kafka 0.1.2
* emqx_bridge_pulsar 0.1.1
* emqx_ee_connector 0.1.12
2023-05-02 17:29:22 +03:00
Andrew Mayorov
4575167607
feat(resource): drop manager_id() type 2023-05-02 17:29:20 +03:00
Andrew Mayorov
aaef95b1da
feat(resman): stop adding uniqueness to manager ids
Before this change, a separate `manager_id` / `instance_id` was used
as resource manager id, which made connector interface somewhat
inconsistent: part of function calls to connector implementation
used instance id as first argument while the rest used resource id
itself.
2023-05-02 17:28:26 +03:00
Zaiming (Stone) Shi
57cc854a4a test(bridge): fix bridge map type filed converters
now the converters on map type fields only work at the wrapping map
level but not the values
2023-04-30 10:45:11 +02:00
Zaiming (Stone) Shi
b58d3e8f94
Merge pull request #10529 from zmstone/0426-ensure-buffer-worker-monitors-cassandra-conn-pid
0426 ensure buffer worker monitors cassandra conn pid
2023-04-27 22:54:30 +02:00
Paulo Zulato
dd90b2f498 feat(oracle): Oracle Database integration 2023-04-27 13:07:20 -03:00
Thales Macedo Garitezi
567413389c
Merge pull request #10519 from thalesmg/fix-flaky-res-test-v50
test(resource): fix flaky test
2023-04-27 09:33:40 -03:00
zhongwencool
1f0148a819
Merge pull request #10524 from lafirest/fix/rocketmq_sensitive
fix(rocketmq): keep sensitive data safe in rocketmq logs and state
2023-04-27 10:16:05 +08:00
Zaiming (Stone) Shi
a8b000f062 refactor(sqlserver): support only sync mode at connector level 2023-04-26 20:44:56 +02:00
Ivan Dyachkov
b76025f541 chore: merge upstream/release-50 2023-04-26 18:01:33 +02:00
Zaiming (Stone) Shi
c83d630c97 fix(cassandra): ensure async calls return connection pid
so the buffer worker can monitor it and perform retries
if the connection restarted
2023-04-26 14:33:37 +02:00
firest
9eccfa5cdf fix(dynamo): fix test case errors 2023-04-26 17:03:01 +08:00
firest
6706fd90e1 fix(rocketmq): keep sensitive data safe in rocketmq logs and state 2023-04-26 16:10:35 +08:00
firest
e467e082f0 fix(dynamo): remove all async callbacks of the Dynamo connector 2023-04-26 14:47:22 +08:00
Zhongwen Deng
bc1bdae55d chore: reslove confilt for sync release-50 to master 2023-04-26 11:50:44 +08:00
zhongwencool
9d893b49eb
Merge branch 'master' into sync-release-50-to-master 2023-04-26 10:54:46 +08:00
Thales Macedo Garitezi
79cf5cad19
Merge pull request #10378 from thalesmg/pulsar-producer-e50
feat: implement Pulsar Producer bridge (e5.0)
2023-04-25 18:01:43 -03:00
Thales Macedo Garitezi
687509886e test: rm unused var warning 2023-04-25 17:37:20 -03:00
lafirest
dc452deaf0
Merge pull request #10506 from lafirest/fix/dynamo_default_port
fix(dynamo): use correct default port for different schemas
2023-04-25 18:26:44 +08:00
firest
3bb50a5751 fix(rocketmq): fix that the update of ACL info not working 2023-04-25 16:55:03 +08:00
firest
33c27ac2ac fix(dynamo): use correct default port for different schemas 2023-04-25 10:50:44 +08:00
Thales Macedo Garitezi
99f3965f4e feat(schema_registry): use rocksdb as table type for protobuf cache 2023-04-24 14:24:42 -03:00
Thales Macedo Garitezi
377b143325 refactor: split parse_server into smaller functions, improve return type to use map 2023-04-24 14:17:29 -03:00
Thales Macedo Garitezi
ad4be08bb2 feat: implement Pulsar Producer bridge (e5.0)
Fixes https://emqx.atlassian.net/browse/EMQX-8398
2023-04-24 10:28:26 -03:00
firest
7ce04358c4 fix(Dynamo): fix DynamoDB bridge status check error 2023-04-24 17:28:33 +08:00
JianBo He
2b0106e047
Merge pull request #10485 from JimMoen/fix-mssql-bridge-default
fix: use default health check timeout for sqlserver
2023-04-23 18:20:10 +08:00
JimMoen
d505b65ba8
fix: use default health check timeout for sqlserver 2023-04-23 15:47:19 +08:00
JimMoen
4e7472090b
fix: refine default sql and driver name for mssql bridge 2023-04-23 15:47:18 +08:00
firest
5ad5d7ee8d fix(opents): adjust code structure 2023-04-23 14:28:14 +08:00
lafirest
6ef032026f
Merge pull request #10471 from lafirest/fix/dynamo_bridge
fix(dynamo): separate the implementation of connector and client of Dynamo bridge
2023-04-23 14:25:23 +08:00
firest
932a327952 chore: make spellcheck and xref happy 2023-04-23 11:22:56 +08:00
firest
0b46acda87 test(opents): add test cases for OpenTSDB 2023-04-23 11:03:20 +08:00
firest
d826b0921d fix(dynamo): separate the implementation of connector and client of Dynamo bridge 2023-04-23 10:57:36 +08:00
firest
5074825075 feat(opents): OpenTSDB integration 2023-04-23 09:56:24 +08:00
Ilya Averyanov
ebb75b275e feat(ft): update app versions 2023-04-21 17:52:13 +03:00
Ilya Averyanov
0211bcf030 Merge branch 'master' into file-transfer
* master: (279 commits)
  chore: shorten ct/run.sh script
  chore: rename cassandra_impl to cassandra_connector
  chore: fix mix.exs checking
  refactor(cassandra): move cassandra bridge into its own app
  chore: apply review suggestions
  chore: update changes/ce/fix-10449.en.md
  test: add a test for authn {}
  chore: add changlog for authn_http validation
  fix: always check authn_http's header and ssl_option
  chore: apply suggestions from code review
  fix(emqx_bridge): validate Webhook bad URL and return 'BAD_REQUEST' if it's invalid
  fix(emqx_alarm): add safe call API to activate/deactivate alarms and use it in resource_manager
  perf(emqx_alarm): use dirty Mnesia operations to activate an alarm
  ci: simplify find-apps.sh for ee apps
  perf(emqx_resource): don't reactivate alarms on reoccurring errors
  ci: check if Elixir files are formatted in pre-commit hook
  fix(dynamo): fix field name errors
  chore: remove *_collector for prometheus api's example
  chore: make plugins config to low level
  chore: re-split dynamo i18n file
  ...
2023-04-21 17:37:17 +03:00
JianBo He
b270623c46 chore: rename cassandra_impl to cassandra_connector 2023-04-21 16:49:25 +08:00
firest
7704995279 fix(rocketmq): expose the driver parameter sync_timeout into the RocketMQ bridge configuration 2023-04-21 15:10:25 +08:00
JianBo He
5cc28a7b45 chore: fix mix.exs checking 2023-04-21 14:46:09 +08:00
JianBo He
bdce32e713 refactor(cassandra): move cassandra bridge into its own app 2023-04-21 14:45:38 +08:00
JianBo He
6532cfb337
Merge pull request #10452 from thalesmg/refactor-gcp-pubsub-bridge-v50
refactor(gcp_pubsub): move GCP PubSub Bridge to its own app
2023-04-21 14:42:00 +08:00
lafirest
48402d0476
Merge pull request #10461 from lafirest/fix/dynamo_db_svrs
fix(rocketmq): allow setting multiple addresses in RocketMQ bridge
2023-04-21 14:37:37 +08:00
firest
f602900a53 fix(rocketmq): fix that the status check of RocketMQ bridge may not accurate 2023-04-21 13:35:29 +08:00
firest
d865998a63 fix(rocketmq): fix test cases 2023-04-21 11:02:14 +08:00
firest
21473e7ca5 fix(dynamo): fix field name errors 2023-04-20 18:16:04 +08:00
firest
6e12abff39 fix(rocketmq): allow setting multiple addresses in RocketMQ bridge 2023-04-20 17:58:12 +08:00