Commit Graph

12608 Commits

Author SHA1 Message Date
Thales Macedo Garitezi
69ac6b9e0d fix(kafka): fix handling of dropped.queue_full event from wolff
https://emqx.atlassian.net/browse/EMQX-8530

cd20a37e65/src/wolff_producer.erl (L772-L773)

Wolff emits 2 events related to dropped messages when replayq reports
overflow.  Since in EMQX's side we also bump `dropped` when
`dropped_queue_full` happens, that was leading to wrong metrics.
2023-01-02 09:23:38 -03:00
Thales Macedo Garitezi
305ed68916 chore: bump app vsns 2022-12-30 16:51:24 -03:00
Thales Macedo Garitezi
61246c43c4 fix(kakfa_producer): prevent multiple producers from multiplying each other's metrics 2022-12-30 16:51:24 -03:00
Thales Macedo Garitezi
8b060a75f1 refactor(metrics): use absolute gauge values rather than deltas
https://emqx.atlassian.net/browse/EMQX-8548

Currently, we face several issues trying to keep resource metrics
reasonable.  For example, when a resource is re-created and has its
metrics reset, but then its durable queue resumes its previous work
and leads to strange (often negative) metrics.

Instead using `counters` that are shared by more than one worker to
manage gauges, we introduce an ETS table whose key is not only scoped
by the Resource ID as before, but also by the worker ID.  This way,
when a worker starts/terminates, they should set their own gauges to
their values (often 0 or `replayq:count` when resuming off a queue).
With this scoping and initialization procedure, we'll hopefully avoid
hitting those strange metrics scenarios and have better control over
the gauges.
2022-12-30 16:51:24 -03:00
Thales Macedo Garitezi
24bae2641e chore: upgrade wolff -> 1.7.4 2022-12-29 16:58:00 -03:00
Thales Macedo Garitezi
ce43e6b3d6 chore: upgrade kafka_protocol, wolff, brod 2022-12-27 10:30:14 -03:00
Thales Macedo Garitezi
4819794401 test(refactor): decrease test teardown noise 2022-12-27 10:30:14 -03:00
Thales Macedo Garitezi
6fdcba641e test(refactor): no need for monitor
the janitor is already linked to the parent
2022-12-27 10:30:14 -03:00
Thales Macedo Garitezi
a0e11f75d9 refactor(docs): use var for output filepath 2022-12-27 10:30:14 -03:00
lafirest
2ff6ef01f1
Merge pull request #9599 from lafirest/fix/blacklist_default_exp
fix(banned): ensure the default expiration time of `banned` is large enough
2022-12-27 17:30:10 +08:00
Thales Macedo Garitezi
a78ecc4bb6
Merge pull request #9579 from thalesmg/bugfix-kafka-producer-stop-client-ee50
fix(kafka_producer): cleanup client after failing to start producers
2022-12-26 08:59:36 -03:00
zhongwencool
81b226a801
Merge pull request #9608 from zmstone/1123-pin-hocon-0.33.0
1123 pin hocon 0.33.0
2022-12-26 19:22:21 +08:00
firest
af3f0c9bb0 fix(banned): ensure the default timeout of banned is large enough 2022-12-26 10:17:31 +08:00
Zaiming (Stone) Shi
f93c22045d fix: non-empty field should not be undefined 2022-12-24 11:41:45 +01:00
Zaiming (Stone) Shi
269a40a9ea fix: format psk user lookup fun back to string 2022-12-23 19:22:15 +01:00
Thales Macedo Garitezi
1e3b0c3777
Merge pull request #9609 from thalesmg/mqtt-conn-clientid-v50
feat(mqtt): add option to customize clientid prefix for egress bridges
2022-12-23 12:31:44 -03:00
Zaiming (Stone) Shi
d3efb0c0ba chore: bump app versions 2022-12-23 15:10:16 +01:00
Zaiming (Stone) Shi
350023e757 fix(config): option only_fill_defaults renamed to make_serializable 2022-12-23 14:27:04 +01:00
Thales Macedo Garitezi
35dc75b7ed feat(mqtt): add option to customize clientid prefix for egress bridges
https://emqx.atlassian.net/browse/EMQX-8445

Currently the bridge client’s client ID is prefixed with the resource
ID.

Sometimes it’s useful for users to have control of this prefix,
e.g. prefix based ACL rules in the target broker.
2022-12-23 09:50:26 -03:00
Ilya Averyanov
fa7433628c fix(logs): set password field sensitive for connectors 2022-12-23 12:46:03 +01:00
Zaiming (Stone) Shi
700c64fcf0
Merge pull request #9607 from id/docs-remove-references-to-jp-readme
docs: remove references to README-JP.md
2022-12-23 12:13:57 +01:00
Zaiming (Stone) Shi
59970272ff chore: pin hocon 0.33.0 2022-12-23 12:07:36 +01:00
Zaiming (Stone) Shi
6292d7ec68 refactor: remove dead code 2022-12-23 12:07:36 +01:00
Ivan Dyachkov
9eb628f94b docs: remove references to README-JP.md 2022-12-23 09:59:18 +01:00
Ivan Dyachkov
317dd06d25
Merge pull request #9604 from id/docs-update-readme
docs: update readme
2022-12-23 09:56:54 +01:00
Zaiming (Stone) Shi
d70a6ec477 docs: update README with Erlang/OTP requirements 2022-12-23 09:21:49 +01:00
Zaiming (Stone) Shi
2855c39fa9
Merge pull request #9560 from lafirest/fix/conf_template_psk
fix(psk): add new supported ciphers to the conf template
2022-12-22 18:58:28 +01:00
Ivan Dyachkov
3ed14fbfee docs: update readme
- remove info about unixodbc, it's relevent for enterprise only atm
- remove references to 4.3
- update info about supported OTP versions
2022-12-22 17:37:49 +01:00
Ivan Dyachkov
7eebc67f61
Merge pull request #9603 from emqx/50-ci-fix-self-hosted-macos-runners
50 ci fix self hosted macos runners
2022-12-22 17:09:42 +01:00
Zaiming (Stone) Shi
c678770532
Merge pull request #9571 from olcai/improve-mysql-bridge-test
fix: infinite recursion in mysql connector and improve mysql EE bridge tests
2022-12-22 15:37:37 +01:00
Ivan Dyachkov
a1af5742e2 chore: use unique name for temp macos keychain 2022-12-22 15:34:28 +01:00
Ivan Dyachkov
780d715dfb ci: issue with linking unixodbc when building OTP on macos arm64 2022-12-22 15:34:28 +01:00
Ivan Dyachkov
0baeb6866b
Merge pull request #9600 from emqx/1222-fix-brew-install-in-ci
ci: make homebrew more conservative
2022-12-22 15:34:06 +01:00
Ivan Dyachkov
d70135cc08 ci: make homebrew more conservative 2022-12-22 14:34:45 +01:00
Zaiming (Stone) Shi
188f829592
Merge pull request #9590 from id/ci-use-our-own-setup-beam-fork
ci: use our own setup-beam fork
2022-12-22 14:27:38 +01:00
Erik Timan
13942f5c49 refactor: rename error return in mysql connector 2022-12-22 10:29:12 +01:00
Erik Timan
cc47ce0034 chore: update changes 2022-12-22 10:27:38 +01:00
Erik Timan
aab914d65a test: refactor EE mysql bridge test case
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-12-22 10:27:38 +01:00
Erik Timan
d5a41b801e chore: update changes 2022-12-22 10:27:38 +01:00
Erik Timan
7df24000a0 test: add more EE mysql bridge test cases 2022-12-22 10:27:38 +01:00
Erik Timan
23ac426608 fix(emqx_connector): check for key among prepared statements on query
An infinite loop was triggered in the mysql connector when a query
used a prepared statement key that was not among the defined prepared
statements on start. We now check that the key is defined among the
prepared statements before recursing. It seems that this bug was never
triggered in any production code flow and simply found while writing
tests.

An error return spell fix is also included as well as a FIXME comment
regarding running mysql:prepare and not distinguishing between
transient failures and syntax errors. Syntax errors should not be
retried.
2022-12-22 10:27:38 +01:00
Ivan Dyachkov
0599bd7cfc ci: use our own setup-beam fork
https://github.com/erlef/setup-beam/issues/167
2022-12-22 09:15:57 +01:00
lafirest
f660724bf7
Merge pull request #9582 from lafirest/fix/fix_field_name
fix(limiter): change limiter `cache` to `buffer`
2022-12-21 18:12:40 +08:00
Zaiming (Stone) Shi
9066513bef
Merge pull request #9576 from id/chore-fix-bin-emqx-logging-on-non-tty
chore: fix logging in bin/emqx on non-tty
2022-12-21 09:47:00 +01:00
firest
6f3e952edf fix(psk): add new supported ciphers to the conf template 2022-12-20 22:40:49 +08:00
firest
a8e020af58 fix(limiter): change limiter cache to buffer 2022-12-20 22:30:52 +08:00
Zaiming (Stone) Shi
516147ad00
Merge pull request #9581 from zmstone/1219-fix-mqtt-bridge-config
1219 fix mqtt bridge config
2022-12-20 14:47:02 +01:00
Zaiming (Stone) Shi
b5dbfcf280
Merge pull request #9578 from zmstone/1219-fix-shared-sub-sticky
1219 fix shared sub sticky
2022-12-20 13:49:59 +01:00
Zaiming (Stone) Shi
f19d649c11
Merge pull request #9584 from kjellwinblad/kjell/fix_jq_dont_start_port_programs_when_they_are_not_needed
fix: do not start jq port programs when they are not needed
2022-12-20 13:47:52 +01:00
Kjell Winblad
75021b376e fix: do not start jq port programs when they are not needed
The jq function in the rule engine uses the jq NIF implementation by
default so there is often no need to start any jq port programs. Before
this commit jq port programs were started anyway. This is fixed by not
starting the jq application (the jq application is started automatically
when the jq port implementation is activated).
2022-12-20 12:10:35 +01:00